
| 字段 | 值 |
|---|---|
| CVE | CVE-2024-21762 |
| 安全公告 | FG-IR-24-015 |
| CVSS | 9.8 (严重) |
| CWE | CWE-787 (越界写入) |
| CISA KEV | 是 - 已在野外被积极利用 |
| 攻击向量 | 网络 (无需认证) |
| 受影响组件 | sslvpnd (SSL VPN 守护进程) |
FortiOS SSL VPN 中的越界写入漏洞允许远程未认证的攻击者通过特制的 HTTP 请求执行任意代码或命令。该漏洞存在于 sslvpnd 中的 HTTP 分块传输编码解析器内。当守护进程接收到带有 Transfer-Encoding: chunked 的 POST 请求时,未能正确验证分块大小,导致堆中的越界写入。
| 版本分支 | 受影响版本 | 修复版本 |
|---|---|---|
| FortiOS 7.4 | 7.4.0 - 7.4.2 | 7.4.3 |
| FortiOS 7.2 | 7.2.0 - 7.2.6 | 7.2.7 |
| FortiOS 7.0 | 7.0.0 - 7.0.13 | 7.0.14 |
| FortiOS 6.4 | 6.4.0 - 6.4.14 | 6.4.15 |
| FortiOS 6.2 | 6.2.0 - 6.2.15 | 6.2.16 |
| FortiOS 6.0 | 所有版本 | 升级 |
该脚本比较服务器对正常 POST 请求与对同一有效端点 (/remote/logincheck) 的带有 Transfer-Encoding: chunked 的 POST 请求的响应。
Content-Length:服务器处理请求并返回 HTTP 响应 (200 OK)。Transfer-Encoding: chunked:在存在漏洞的版本上,sslvpnd 无法处理分块编码,并关闭连接而不响应 (0 字节)。这种差异行为确认了该漏洞,而不会触发实际的越界写入。
Normal POST --> HTTP/1.1 200 OK (N bytes)
Chunked POST --> Connection closed (0 bytes) <-- VULNERABLE
Normal POST --> HTTP/1.1 200 OK (N bytes)
Chunked POST --> HTTP/1.1 200 OK (N bytes) <-- PATCHED
python cve_2024_21762_safecheck.py <host> <port>
$ python cve_2024_21762_safecheck.py 10.0.0.1 8443
[*] Target: 10.0.0.1:8443
[*] CVE-2024-21762 - Out-of-Bounds Write in sslvpnd (CVSS 9.8)
[*] Method: Compare normal POST vs chunked POST response
[*] Test 1: Normal POST to /remote/logincheck
Response: HTTP/1.1 200 OK
Size: 722 bytes
[*] Test 2: Chunked POST to /remote/logincheck
Response: empty (connection closed by server)
============================================================
[!] VULNERABLE to CVE-2024-21762
Normal POST works but chunked TE causes connection
drop -> sslvpnd cannot handle chunked TE
Severity: CRITICAL (CVSS 9.8)
CISA KEV: Yes (actively exploited in the wild)
============================================================
| 结果 | 含义 |
|---|---|
VULNERABLE | 正常 POST 有响应,分块 POST 连接断开 |
PATCHED | 两个请求都收到 HTTP 响应 |
INCONCLUSIVE | 两个请求均未收到响应(可能存在速率限制,稍后重试) |
/remote/logincheck 多次 POST 请求后激活速率限制。如果得到 INCONCLUSIVE,请等待几分钟后重试。/remote/VULNCHECK 作为端点。该路径可能不会在所有 FortiGate 版本上返回预期的 403,导致结果不可靠。本脚本使用 /remote/logincheck,这是一个已知有效的 SSL VPN 端点。