Dragonfly has weak integrity checks for downloaded files
Description
Dragonfly is an open source P2P-based file distribution and image acceleration system. Prior to 2.1.0, the DragonFly2 uses a variety of hash functions, including the MD5 hash, for downloaded files. This allows attackers to replace files with malicious ones that have a colliding hash. This vulnerability is fixed in 2.1.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Dragonfly 2 prior to 2.1.0 uses MD5 hashes for file integrity, allowing attackers to swap files with collision-based substitutes.
Vulnerability
Description
Dragonfly, an open-source P2P file distribution and image acceleration system, prior to version 2.1.0 relied on a variety of hash functions for integrity verification of downloaded files, including the MD5 hash algorithm [1][3]. MD5 is well-known to lack collision resistance, meaning an attacker can craft two different inputs that produce the same hash output [3]. This weakness undermines the integrity guarantees of the system.
Exploitation
Scenario
An attacker (peer Alice) can create an innocent image and a malicious one, both designed so their respective MD5 piece hashes collide. The metadata (PieceMd5Sign) for both images becomes identical. Alice shares the innocent image with other peers, who validate it as correct. When Bob requests the image, Alice supplies the malicious version instead; Bob's integrity check uses the colliding MD5 hashes, and the seemingly valid SHA256 hash of the piece digests is accepted [3]. The attacker does not need special privileges beyond being a peer in the network.
Impact
A successful attacker can replace a legitimate file with a malicious one while all integrity checks pass. This allows the distribution of tampered container images, binaries, or other data across the P2P network, potentially leading to arbitrary code execution or other compromise on systems that consume the altered files [1][3].
Mitigation
The vulnerability is fixed in Dragonfly version 2.1.0 [1][3]. Users should upgrade to this version or later. No effective workarounds exist [3]. The issue was identified during a third-party security audit by Trail of Bits [3][4].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/dragonflyoss/dragonflyGo | < 2.1.0 | 2.1.0 |
d7y.io/dragonfly/v2Go | < 2.1.0 | 2.1.0 |
Affected products
2- Range: <2.1.0
- dragonflyoss/dragonflyv5Range: < 2.1.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-hx2h-vjw2-8r54ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-59354ghsaADVISORY
- github.com/dragonflyoss/dragonfly/blob/main/docs/security/dragonfly-comprehensive-report-2023.pdfghsax_refsource_MISCWEB
- github.com/dragonflyoss/dragonfly/security/advisories/GHSA-hx2h-vjw2-8r54ghsax_refsource_CONFIRMWEB
- pkg.go.dev/vuln/GO-2025-3973ghsaWEB
News mentions
0No linked articles in our index yet.