Dalfox Server Mode Vulnerable to Unauthenticated Remote Code Execution via `found-action`
Dalfox in REST API server mode is vulnerable to unauthenticated remote code execution (CVE-2026-45087) because the server binds to 0.0.0.0:6664 by default without requiring an API key and deserializes attacker-supplied JSON in `POST /scan` without stripping the `FoundAction` and `FoundActionShell` fields, allowing arbitrary command execution.
Dalfox, a security auditing tool, is vulnerable to unauthenticated remote code execution (CVE-2026-45087) when running in REST API server mode (dalfox server) with default settings. The server binds to 0.0.0.0:6664 and, unless explicitly configured with --api-key, does not require authentication. A flaw exists in how the server handles model.Options, specifically FoundAction and FoundActionShell, which are deserialized directly from attacker-supplied JSON in POST /scan. Because dalfox.Initialize propagates these fields into the final scan options without sanitization, any unauthenticated attacker can execute arbitrary shell commands on the host OS whenever a scan finding is triggered. This vulnerability affects dalfox versions 2.12.0 and earlier.
Attack Chain
- The attacker starts a
dalfox serverinstance in REST API mode without specifying an API key, leaving it open to unauthenticated access. - The attacker sets up a malicious web server that reflects input, ensuring any scan against it will produce a finding.
- The attacker crafts a
POSTrequest to the/scanendpoint of the dalfox server. - The request includes a JSON payload containing the URL of the malicious web server and
optionswith malicious values forfound-actionandfound-action-shell. - The
postScanHandlerdeserializes the JSON payload into aReqstruct, including theoptionsfield which contains the maliciousFoundActionandFoundActionShellvalues. - The
ScanFromAPIfunction is called, passing the attacker-controlled options todalfox.Initialize. dalfox.Initializecopies the attacker-suppliedFoundActionandFoundActionShellvalues into the scan options without sanitization.- When a finding is triggered during the scan, the
foundActionfunction executes the attacker-supplied shell command usingexec.Command, achieving remote code execution on the dalfox host.
Impact
Successful exploitation results in unauthenticated remote code execution on the host running dalfox server. This grants the attacker full read access to secrets, configuration files, and credentials accessible to the dalfox process. The attacker can perform arbitrary file writes, enabling persistence, backdoor installation, and data exfiltration. The default 0.0.0.0 bind address exposes the server to all network interfaces, potentially including public-facing ones in misconfigured environments.
Recommendation
- Require API key: Enforce the use of
--api-keyin REST server mode by rejecting server startup if no API key is provided, as described in the remediation suggestion within the advisory. - Strip
FoundAction/FoundActionShell: Sanitize API-sourced requests by removing theFoundActionandFoundActionShelloptions in thepostScanHandlerto prevent untrusted callers from setting execution-control options. - Deploy the Sigma rules: Deploy the provided Sigma rules to your SIEM and tune them for your environment to detect exploitation attempts.
- Upgrade Dalfox: Upgrade to a patched version of Dalfox that addresses CVE-2026-45087.
Detection coverage 2
Detect CVE-2026-45087 Exploitation — Dalfox Scan POST Request with Found Action
criticalDetects CVE-2026-45087 exploitation — An HTTP POST request to /scan with found-action and found-action-shell parameters, indicating a command injection attempt.
Detect CVE-2026-45087 Exploitation — Dalfox Found Action Command Execution
criticalDetects CVE-2026-45087 exploitation — Command execution with a parent process indicating Dalfox command injection.
Detection queries are available on the platform. Get full rules →