ghsa-mcvp-rpgg-9273
Vulnerability from github
5.5 (Medium) - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Impact
The code in the scheduler for downloading a tiny file is hard coded to use the HTTP protocol, rather than HTTPS. This means that an attacker could perform a Man-in-the-Middle attack, changing the network request so that a different piece of data gets downloaded. Due to the use of weak integrity checks (TOB-DF2-15), this modification of the data may go unnoticed.
golang
// DownloadTinyFile downloads tiny file from peer without range.
func (p *Peer) DownloadTinyFile() ([]byte, error) {
ctx, cancel := context.WithTimeout(context.Background(),
downloadTinyFileContextTimeout)
defer cancel()
// Download url:
http://${host}:${port}/download/${taskIndex}/${taskID}?peerId=${peerID}
targetURL := url.URL{
Scheme:
}
"http",
fmt.Sprintf("%s:%d", p.Host.IP, p.Host.DownloadPort),
fmt.Sprintf("download/%s/%s", p.Task.ID[:3], p.Task.ID),
Host:
Path:
RawQuery: fmt.Sprintf("peerId=%s", p.ID),
A network-level attacker who cannot join a peer-to-peer network performs a Man-in-the-Middle attack on peers. The adversary can do this because peers (partially) communicate over plaintext HTTP protocol. The attack chains this vulnerability with the one described in TOB-DF2-15 to replace correct files with malicious ones. Unconscious peers use the malicious files.
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.
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/dragonflyoss/dragonfly" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.1.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "d7y.io/dragonfly/v2" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.1.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-59410" ], "database_specific": { "cwe_ids": [ "CWE-311" ], "github_reviewed": true, "github_reviewed_at": "2025-09-17T20:23:25Z", "nvd_published_at": "2025-09-17T20:15:38Z", "severity": "MODERATE" }, "details": "### Impact\nThe code in the scheduler for downloading a tiny file is hard coded to use the HTTP protocol, rather than HTTPS. This means that an attacker could perform a Man-in-the-Middle attack, changing the network request so that a different piece of data gets downloaded. Due to the use of weak integrity checks (TOB-DF2-15), this modification of the data may go unnoticed.\n\n```golang\n// DownloadTinyFile downloads tiny file from peer without range.\nfunc (p *Peer) DownloadTinyFile() ([]byte, error) {\n ctx, cancel := context.WithTimeout(context.Background(),\ndownloadTinyFileContextTimeout)\n defer cancel()\n // Download url:\nhttp://${host}:${port}/download/${taskIndex}/${taskID}?peerId=${peerID}\n targetURL := url.URL{\nScheme:\n}\n\"http\",\nfmt.Sprintf(\"%s:%d\", p.Host.IP, p.Host.DownloadPort),\nfmt.Sprintf(\"download/%s/%s\", p.Task.ID[:3], p.Task.ID),\nHost:\nPath:\nRawQuery: fmt.Sprintf(\"peerId=%s\", p.ID),\n```\n\nA network-level attacker who cannot join a peer-to-peer network performs a Man-in-the-Middle attack on peers. The adversary can do this because peers (partially) communicate over plaintext HTTP protocol. The attack chains this vulnerability with the one described in TOB-DF2-15 to replace correct files with malicious ones. Unconscious peers use the malicious files.\n\n### Patches\n\n- Dragonfy v2.1.0 and above.\n\n### Workarounds\n\nThere are no effective workarounds, beyond upgrading.\n\n### References\n\nA third party security audit was performed by Trail of Bits, you can see the [full report](https://github.com/dragonflyoss/dragonfly/blob/main/docs/security/dragonfly-comprehensive-report-2023.pdf).\n\nIf you have any questions or comments about this advisory, please email us at [dragonfly-maintainers@googlegroups.com](mailto:dragonfly-maintainers@googlegroups.com).", "id": "GHSA-mcvp-rpgg-9273", "modified": "2025-09-26T16:20:03Z", "published": "2025-09-17T20:23:25Z", "references": [ { "type": "WEB", "url": "https://github.com/dragonflyoss/dragonfly/security/advisories/GHSA-mcvp-rpgg-9273" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59410" }, { "type": "PACKAGE", "url": "https://github.com/dragonflyoss/dragonfly" }, { "type": "WEB", "url": "https://github.com/dragonflyoss/dragonfly/blob/main/docs/security/dragonfly-comprehensive-report-2023.pdf" }, { "type": "WEB", "url": "https://pkg.go.dev/vuln/GO-2025-3974" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N", "type": "CVSS_V3" }, { "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P", "type": "CVSS_V4" } ], "summary": "DragonFly\u0027s tiny file download uses hard coded HTTP protocol" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.