CVE-2026-40518 ByteDance DeerFlow Path Traversal and Arbitrary File Write via Bootstrap Mode

High 7.1 Published Updated

Attackers can bypass agent name validation in bootstrap mode to write arbitrary files outside the intended directory, potentially achieving code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-40518?

CVE-2026-40518 is a high-severity path traversal vulnerability in bytedance deer-flow, published on 17 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-22

Which versions are affected by CVE-2026-40518?

It affects 1 product.

Products include Bytedance Deerflow.

How do I fix CVE-2026-40518?

No fix has been published for CVE-2026-40518 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40518 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40518 exists.

Sources

Also known as GHSA-54pv-34f9-m4mq.

Is CVE-2026-40518 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free