CVE-2025-59349
JSON

2.0low

Directories created via os.MkdirAll are not checked for permissions

Severity
2.0low CVSS:4.0 by GitHub_M
Exploit likelihood
0.12% (higher than 1% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8425-8r2f-mrv6GO-2025-3964

Description

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.

Affected

Product or packageVersionsReported by
dragonflyoss dragonfly< 2.1.0CVE List
github.com/dragonflyoss/dragonfly (Go)before 2.1.0, all versionsGitHub Advisory Database, Go Vulnerability Database
d7y.io/dragonfly/v2 (Go)before 2.1.0GitHub Advisory Database, Go Vulnerability Database
linuxfoundation dragonflybefore 2.1.0NVD

All scores

GitHub_M2.0low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-276CWE-732

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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.

Go Vulnerability Database

Dragonfly's directories created via os.MkdirAll are not checked for permissions in d7y.io/dragonfly

NVD (es)

Dragonfly es un sistema de distribución de archivos basado en P2P de código abierto y aceleración de imágenes. Antes de la versión 2.1.0, DragonFly2 utiliza la función os.MkdirAll para crear ciertas rutas de directorio con permisos de acceso específicos. Esta función no realiza ninguna comprobación de permisos cuando una ruta de directorio dada ya existe. Esto permite a un atacante local crear un directorio que será utilizado posteriormente por DragonFly2 con permisos amplios antes de que DragonFly2 lo haga, lo que podría permitir al atacante manipular los archivos. Esta vulnerabilidad se corrige en la versión 2.1.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-59349 changed 2025-09-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-8425-8r2f-mrv6 changed 2025-09-26CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3964 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-59349 changed 2026-06-17Public domain