CVE-2025-58413: Stack buffer overflow in CAPWAP daemon
A stack-based buffer overflow vulnerability in Fortinet FortiOS 7.6.0 through 7.6.3, FortiOS 7.4.0 through 7.4.8, FortiOS 7.2 all versions, FortiOS 7.0 all versions, FortiOS 6.4 all versions, FortiOS 6.2 all versions, FortiOS 6.0 all versions, FortiSASE 25.3.b allows attacker to execute unauthorized code or commands via specially crafted packets
Other sources
A stack-based overflow vulnerability [CWE-124] in FortiOS CAPWAP daemon may allow a remote unauthenticated attacker on an adjacent network to achieve arbitrary code execution via sending specially crafted packets. Note that in the default configuration, the attacker must be in control of an authorized FortiAP for the attack to succeed and have access to the same local IP subnet. Additionally, successful exploitation would require defeating stack protection and ASLR.
— FortiGuard
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
FortiOSto a version that resolves this vulnerability.Fixed in 7.4.9 - Upgrade
Upgrade
FortiOSto a version that resolves this vulnerability.Fixed in 7.6.4 - Upgrade
Upgrade
FortiSASEto a version that resolves this vulnerability.Fixed in 25.3.c
Event History
Frequently Asked Questions
What is the severity of CVE-2025-58413?
CVE-2025-58413 is classified as a high-severity vulnerability due to its potential for remote code execution.
How do I fix CVE-2025-58413?
To remediate CVE-2025-58413, upgrade FortiOS to versions 7.6.4, 7.4.9 or higher.
Which Fortinet products are affected by CVE-2025-58413?
CVE-2025-58413 affects FortiOS 7.6.0 through 7.6.3, 7.4.0 through 7.4.8, and earlier versions as well as FortiSASE 25.3.b.
What types of attacks does CVE-2025-58413 allow?
CVE-2025-58413 allows attackers to execute arbitrary code through a stack-based buffer overflow.
Are older FortiOS versions vulnerable to CVE-2025-58413?
Yes, all versions of FortiOS prior to 7.6.4 and 7.4.9 are vulnerable to CVE-2025-58413.