cbcvebase.
CVE-2024-23108
published 2024-02-05

CVE-2024-23108: An improper neutralization of special elements used in an os command ('os command injection') vulnerability in Fortinet allows attacker to execute unauthorized…

PriorityP197critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
ITWEXPLOITVulnCheck KEVRansomwareInitial access
Exploited in the wild
EPSS
78.38%
99.5th percentile
An improper neutralization of special elements used in an os command ('os command injection') vulnerability in Fortinet allows attacker to execute unauthorized code or commands via via crafted API requests.

Affected

10 ranges
VendorProductVersion rangeFixed in
fortinetfortinet
fortinetfortisiem
fortinetfortisiem
fortinetfortisiem
fortinetfortisiem6.4.0 – 6.4.2
fortinetfortisiem6.5.0 – 6.5.2
fortinetfortisiem6.6.0 – 6.6.3
fortinetfortisiem6.7.0 – 6.7.8
fortinetfortisiem7.0.0 – 7.0.2
fortinetfortisiem7.1.0 – 7.1.1

Detection & IOCsextracted from sources · hover to see the quote

port7900
path/opt/phoenix/log/phoenix.logs
commanddatastore.py nfs test
snort
alert tcp any any -> $HOME_NET 7900 (msg:"ET EXPLOIT Fortinet FortiSIEM Unauthenticated Command Injection CVE-2024-23108"; flow:established,to_server; content:"|51 00 00 00|"; startswith; content:"]*>[^\x3b/Rsi"; reference:url,horizon3.ai/attack-research/cve-2024-23108-fortinet-fortisiem-2nd-order-command-injection-deep-dive/; reference:cve,2024-23108; classtype:misc-attack; sid:2052889; rev:1; metadata:attack_target Server, created_at 2024_05_28, cve CVE_2024_23108, deployment Perimeter, deployment Internal, confidence High, signature_severity Major, tag Exploit, updated_at 2024_05_28, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application;)
bytes
\x51\x00\x00\x00\x74\x00\x00\x00\x6f\x42\x1e\x40\x00\x00\x00\x00
bytes
|51 00 00 00|
  • Monitor TCP port 7900 (Phoenix Monitor service) for inbound connections, especially from untrusted/external sources. Exploit traffic begins with the byte sequence 51 00 00 00.
  • Search FortiSIEM logs for 'PHL_ERROR' entries referencing 'datastore.py nfs test' — this is the specific log artifact left by exploitation attempts.
  • Inspect /opt/phoenix/log/phoenix.logs for 'PHL_ERROR' lines that include a payload URL and a target file path, indicating active exploitation of the phMonitor service.
  • The vulnerability is triggered via XML parsing of TEST_STORAGE elements where the mount_point field is injected with shell metacharacters (e.g., semicolons). Look for crafted XML with unsanitized mount_point values in traffic to port 7900.
  • Use Shodan/FOFA queries to identify exposed FortiSIEM instances: search for port 7900, favicon hash -1341442175, or the HTML string 'var hst = location.hostname'.
  • The exploit is a second-order command injection bypassing the wrapShellToken() fix applied for CVE-2023-34992. Detection should account for parameters passed to datastore.py, not just direct shell invocations.
  • ·The Nuclei template targets TLS-wrapped TCP on port 7900 specifically. Ensure TLS inspection is enabled on network monitoring tools to decode and inspect this traffic.
  • ·The Snort/ET rule uses 'startswith' on the |51 00 00 00| byte sequence, meaning it only fires on the very beginning of the TCP stream. Ensure your IDS/IPS is configured for stream reassembly and startswith matching on port 7900.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vulncheck10.0CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.