Summary
Dragonfly's directories created via os.MkdirAll are not checked for permissions
Workarounds
There are no effective workarounds, beyond upgrading.
References
A third party security audit was performed by Trail of Bits, you can see the full report.
If you have any questions or comments about this advisory, please email us at [email protected].
Impact
DragonFly2 uses the os.MkdirAll function to create certain directory paths with specific access permissions. This function does not perform any permission checks when a given directory path already exists. This allows a local attacker to create a directory to be used later by DragonFly2 with broad permissions before DragonFly2 does so, potentially allowing the attacker to tamper with the files.
Eve has unprivileged access to the machine where Alice uses DragonFly2. Eve watches the commands executed by Alice and introduces new directories/paths with 0777 permissions before DragonFly2 does so. Eve can then delete and forge files in that directory to change the results of further commands executed by Alice.
A file, directory, or other resource is assigned permissions that allow broader access than intended. Typical impact: unauthorized read, modification, or execution of the resource.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- Dragonfy v2.1.0 and above.
Frequently Asked Questions
- What is CVE-2025-59349? CVE-2025-59349 is a low-severity incorrect permission assignment for critical resource vulnerability in github.com/dragonflyoss/dragonfly (go), affecting versions < 2.1.0. It is fixed in 2.1.0. A file, directory, or other resource is assigned permissions that allow broader access than intended.
- Which packages are affected by CVE-2025-59349?
github.com/dragonflyoss/dragonfly(go) (versions < 2.1.0)d7y.io/dragonfly/v2(go) (versions < 2.1.0)
- Is there a fix for CVE-2025-59349? Yes. CVE-2025-59349 is fixed in 2.1.0. Upgrade to this version or later.
- Is CVE-2025-59349 exploitable, and should I be worried? Whether CVE-2025-59349 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-59349 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-59349?
- Upgrade
github.com/dragonflyoss/dragonflyto 2.1.0 or later - Upgrade
d7y.io/dragonfly/v2to 2.1.0 or later
- Upgrade