NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2025-59349: Dragonfly's directories created via os.MkdirAll are not checked for permissions

lowCVSS 4.0 2.0GHSA-8425-8r2f-mrv6

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.

Published Sep 17, 2025 · Updated Sep 26, 2025

Affected packages

github.com/dragonflyoss/dragonfly

Ecosystem
Go
Affected
< 2.1.0
Fixed in
2.1.0
Check
go list -m github.com/dragonflyoss/dragonfly

d7y.io/dragonfly/v2

Ecosystem
Go
Affected
< 2.1.0
Fixed in
2.1.0
Check
go list -m d7y.io/dragonfly/v2

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Patches

  • Dragonfy v2.1.0 and above.

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]](mailto:[email protected]).

Credited to gaius-qi.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Go vulnerabilities

All Go entries