GitHub Advisoryadvisory · Go

GHSA-8425-8r2f-mrv6 Dragonfly's directories created via os.MkdirAll are not checked for permissions

LOW Published 2025-09-17 Modified 2025-09-26 Official page ↗
Aliases
CVE-2025-59349
Ecosystem
Go
Packages
github.com/dragonflyoss/dragonfly, d7y.io/dragonfly/v2
Severity
Low
CVSS vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Weaknesses
CWE-276, CWE-732
Reviewed
2025-09-17

Affected packages

• Go github.com/dragonflyoss/dragonfly: < 2.1.0 → fixed in 2.1.0 • Go d7y.io/dragonfly/v2: < 2.1.0 → fixed in 2.1.0

Description

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].

Related

Alias · CVE (1)

  • CVE-2025-59349 Dragonfly is an open source P2P-based file distribution and image acceleration system. vulnerability

Weakness · CWE (2)

  • CWE-276 Incorrect Default Permissions weakness
  • CWE-732 Incorrect Permission Assignment for Critical Resource weakness

References