{"id":"CVE-2025-59348","aliases":["GHSA-2qgr-gfvj-qpcr","GO-2025-3963"],"url":"https://o3.security/vulnerability/CVE-2025-59348","summary":"Dragonfly incorrectly handles a task structure’s usedTraffic field","details":"### Impact\nThe processPieceFromSource method (figure 4.1) is part of a task processing mechanism. The method writes pieces of data to storage, updating a Task structure along the way. The method does not update the structure’s usedTraffic field, because an uninitialized variable n is used as a guard to the AddTraffic method call, instead of the result.Size variable.\n\n```golang\nvar n int64\nresult.Size, err = pt.GetStorage().WritePiece([skipped])\nresult.FinishTime = time.Now().UnixNano()\nif n > 0 {\n       pt.AddTraffic(uint64(n))\n}\n```\n\nA task is processed by a peer. The usedTraffic metadata is not updated during the processing. Rate limiting is incorrectly applied, leading to a denial-of-service condition for the peer.\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).","published":"2025-09-17T19:30:22.841Z","modified":"2026-08-12T03:51:27.504557660Z","cvss":null,"epss":{"score":0.00355,"percentile":0.28161,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/dragonflyoss/dragonfly","fixedVersion":"2.1.0"},{"ecosystem":"Go","name":"d7y.io/dragonfly/v2","fixedVersion":"2.1.0"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/dragonflyoss/dragonfly/blob/main/docs/security/dragonfly-comprehensive-report-2023.pdf"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59348.json"},{"type":"ADVISORY","url":"https://github.com/dragonflyoss/dragonfly/security/advisories/GHSA-2qgr-gfvj-qpcr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59348"},{"type":"PACKAGE","url":"https://github.com/dragonflyoss/dragonfly"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2025-3963"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:27.504557660Z"}}