CVE-2025-59349: Directories created via os.MkdirAll are not checked for permissions

Published Sep 17, 2025
·
Updated

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 dragonfly-maintainers@googlegroups.com.

Other sources

Dragonfly is an open source P2P-based file distribution and image acceleration system. Prior to 2.1.0, 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. This vulnerability is fixed in 2.1.0.

MITRE

Affected Software

4 affected componentsFixes available
DragonFly DragonFly2<2.1.0
go/github.com/dragonflyoss/dragonfly<2.1.0
2.1.0
linuxfoundation Dragonfly Go<2.1.0
go/d7y.io/dragonfly/v2<2.1.0
2.1.0

Event History

Sep 17, 2025
CVE Published
via MITRE·07:41 PM
Data Sourced
via MITRE·07:41 PM
DescriptionWeakness
Advisory Published
via GitHub·07:55 PM
Data Sourced
via GitHub·07:55 PM
DescriptionWeaknessAffected Software
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-59349?

CVE-2025-59349 is rated as a high severity vulnerability due to improper permission checks in directory creation.

2

How do I fix CVE-2025-59349?

To fix CVE-2025-59349, upgrade DragonFly2 to version 2.1.0 or later.

3

What does CVE-2025-59349 affect?

CVE-2025-59349 affects DragonFly2 versions prior to 2.1.0.

4

What are the risks of CVE-2025-59349?

The risks of CVE-2025-59349 include unauthorized access to sensitive directory paths.

5

Is CVE-2025-59349 a zero-day vulnerability?

CVE-2025-59349 is not a zero-day vulnerability since it has been publicly disclosed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203