Vulnerability record · CVE-2023-30805 · published 10 October 2023
CVE-2023-30805: Sangfor NGAF unauthenticated OS command injection in login endpoint
Sangfor · Next Gen Application Firewall
Sangfor Next-Gen Application Firewall 8.0.17 mishandles shell metacharacters in the "un" parameter of the /LogInOut.php endpoint, allowing OS command injection. Because the endpoint is reachable without authentication, this is a pre-auth remote code execution flaw in an internet-facing security appliance.
Description
The Sangfor Next-Gen Application Firewall version NGAF8.0.17 is vulnerable to an operating system command injection vulnerability. A remote and unauthenticated attacker can execute arbitrary commands by sending a crafted HTTP POST request to the /LogInOut.php endpoint. This is due to mishandling of shell meta-characters in the "un" parameter.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityPre-auth remote command execution on an internet-facing security appliance with a 9.8 CVSS score and high EPSS probability.
What it is
Sangfor Next-Gen Application Firewall 8.0.17 mishandles shell metacharacters in the "un" parameter of the /LogInOut.php endpoint, allowing OS command injection. Because the endpoint is reachable without authentication, this is a pre-auth remote code execution flaw in an internet-facing security appliance.
Impact
An attacker can execute arbitrary operating system commands on the firewall, gaining full control of the device with high confidentiality, integrity and availability impact. Compromise of a perimeter firewall can expose or disrupt the network it protects.
Attack surface
Reached over the network via a crafted HTTP POST to /LogInOut.php; the CVSS vector indicates no privileges and no user interaction are required. The endpoint is part of the appliance's login handling, so it is expected to be exposed to management or internet traffic.
Exploitation
Not listed in CISA KEV, but EPSS is 0.65799 (99.2nd percentile) and a public third-party write-up is tagged as an exploit, indicating public exploit material exists. No ransomware group usage is documented in the record.
What to do
- Apply the vendor patch or fixed firmware for Sangfor NGAF; confirm the exact fixed version with Sangfor since the record does not state one.
- Restrict access to the NGAF management/login interface to trusted networks and block /LogInOut.php from untrusted sources.
- Place the appliance behind access controls or a VPN so the login endpoint is not reachable from the internet.
- Monitor vendor advisories and the referenced WatchTowr and VulnCheck write-ups for updated guidance.
- If patching is delayed, consider isolating or replacing the exposed appliance given pre-auth RCE risk.
Detection
- Inspect HTTP POST requests to /LogInOut.php for shell metacharacters or command syntax in the "un" parameter.
- Alert on unexpected child processes or shell execution spawned by the firewall's web service.
- Review firewall and web logs for anomalous POSTs to login endpoints from untrusted source IPs.
- Hunt for outbound connections or command-and-control traffic originating from the NGAF appliance.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://aws.amazon.com/marketplace/pp/prodview-uujwjffddxzp4 | Product |
| https://labs.watchtowr.com/yet-more-unauth-remote-command-execution-vulns-in-firewalls-sangfor-edition/ | ExploitThird Party Advisory |
| https://vulncheck.com/advisories/sangfor-ngaf-username-rce | Third Party Advisory |
| https://aws.amazon.com/marketplace/pp/prodview-uujwjffddxzp4 | Product |
| https://labs.watchtowr.com/yet-more-unauth-remote-command-execution-vulns-in-firewalls-sangfor-edition/ | ExploitThird Party Advisory |
| https://vulncheck.com/advisories/sangfor-ngaf-username-rce | Third Party Advisory |
Track CVE-2023-30805 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2023-30805), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.