CVE-2026-40518

7.1

ByteDance · DeerFlow

ByteDance DeerFlow is vulnerable to path traversal and arbitrary file write via bootstrap-mode custom-agent creation, allowing attackers to write files outside the intended directory.

Executive summary

An authenticated attacker can exploit a path traversal flaw in ByteDance DeerFlow to perform arbitrary file writes, creating a significant risk of system compromise.

Vulnerability

The vulnerability is a path traversal (CWE-22) issue within the bootstrap-mode custom-agent creation process. By bypassing agent name validation, an authenticated attacker with low privileges can supply traversal sequences or absolute paths to write files to unauthorized locations on the filesystem.

Business impact

The ability to write arbitrary files to a system is a critical security failure that can lead to remote code execution, privilege escalation, or the destruction of system integrity. With a CVSS score of 7.1, this high-severity vulnerability poses a substantial risk to the confidentiality and availability of the host environment, potentially resulting in unauthorized administrative control if malicious scripts are placed in executable directories.

Remediation

Immediate Action: Update the ByteDance DeerFlow installation to commit 2176b2b or later to incorporate the necessary validation logic for agent names.

Proactive Monitoring: Review system logs for unusual file creation events or attempts to access directories outside of the designated custom-agent path.

Compensating Controls: Implement strict filesystem permissions for the service account running DeerFlow to limit the impact of potential file write operations to non-sensitive directories.

Exploitation status

Public Exploit Available: No

Analyst recommendation

Given the potential for arbitrary file writes and the existence of proof-of-concept indicators, organizations should prioritize patching DeerFlow as soon as possible. Applying the vendor-provided fix is the only definitive way to resolve the underlying input validation failure and prevent unauthorized filesystem modifications.

More ByteDance CVEs

Sources

Originally found and disclosed by Chia Min Jun Lennon, per the CVE Program record.