CVE-2026-40518: ByteDance DeerFlow Path Traversal and Arbitrary File Write via Bootstrap Mode
ByteDance DeerFlow before commit 2176b2b contains a path traversal and arbitrary file write vulnerability in bootstrap-mode custom-agent creation where the agent name validation is bypassed. Attackers can supply traversal-style values or absolute paths as the agent name to influence directory creation and write files outside the intended custom-agent directory, potentially achieving arbitrary file write on the system subject to filesystem permissions.
Security readout for executives and security teams
Plain-English summary
A low-privileged remote attacker could abuse DeerFlow’s bootstrap-mode custom-agent creation to write files outside its intended directory. Depending on DeerFlow’s filesystem permissions and targeted location, this could alter application data, disrupt service, or create a path toward broader system compromise.
Executive priority
Treat this as a high-priority remediation for network-accessible or multi-user DeerFlow deployments. Patch promptly and restrict bootstrap functionality while updating. Systems running DeerFlow with broad filesystem permissions deserve accelerated investigation because successful abuse could modify files beyond the application’s intended storage area.
Technical view
DeerFlow before commit 2176b2b fails to enforce agent-name validation during bootstrap-mode custom-agent creation. Traversal-style names or absolute paths can influence directory creation and file placement outside the custom-agent directory. The issue is CWE-22, network reachable, low complexity, requires low privileges, and needs no user interaction.
Likely exposure
Exposure is most likely where a pre-fix DeerFlow deployment permits low-privileged users to invoke bootstrap-mode custom-agent creation. Impact is constrained by the DeerFlow process’s filesystem permissions. The supplied affected-version metadata is imprecise, so deployments should validate their exact commit or vendor release rather than rely on version labels alone.
Exploitation context
The CVSS 4.0 score is 7.1, emphasizing high integrity impact with limited availability impact. The supplied record does not identify CVE-2026-40518 as a KEV and provides no evidence of active exploitation. Exploit availability and observed attacks therefore remain unconfirmed.
Researcher notes
The stated boundary is code before commit 2176b2b. However, the affected metadata lists version “0” with a default status of unaffected, leaving packaged-release mapping unclear. Validation should use commit ancestry or vendor-confirmed release contents. Filesystem permissions determine reachable write targets and practical impact; active exploitation is not established by the supplied evidence.
Mitigation direction
Update to commit 2176b2b or a vendor release confirmed to contain that fix.
Restrict access to bootstrap-mode custom-agent creation until the update is deployed.
Run DeerFlow with only the filesystem permissions required for normal operation.
Check current ByteDance guidance for release-specific remediation details.
Validation and detection
Confirm the deployed source revision contains commit 2176b2b or its equivalent fix.
Verify agent-name validation rejects traversal-style and absolute-path values in bootstrap mode.
Review DeerFlow-accessible directories for unexpected files created outside the custom-agent directory.
Inspect application and access logs for suspicious custom-agent names or unusual bootstrap activity.
Confirm the DeerFlow process cannot write to sensitive operating-system or application locations.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.