github.com/ipfs/kubo affected by DOS Bitswap unbounded persistent memory leakGHSA-qvqg-6rp8-4p9h
MEDIUMGHSA-qvqg-6rp8-4p9h is a medium-severity (CVSS 5.3) vulnerability in github.com/ipfs/kubo. A fix is available for github.com/ipfs/kubo — see the affected versions and patch details below.
Real-World Exposure
github.com/ipfs/kuboReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
An attacker is able allocate arbitrarily many bytes in the Bitswap server by sending many WANT_BLOCK and or WANT_HAVE requests which are queued in an unbounded queue, with allocations that persist even if the connection is closed.
This affects users accepting or connecting untrusted connections such as by running in the public swarm and no pnet config. Nodes that are not publicly reachable but connects to untrusted nodes are also vulnerable to the untrusted nodes being connected to since libp2p connections are blindly bidirectional.
Patches
- 19feb15833c6f4d6e7f1e1b132efaae96d76481d
boxoupdate in Kubo - GHSA-m974-xj4j-7qv5 patches in boxo
Workarounds
Use PNET, swarm filters or resource manager allows list to block untrusted connections.
Note that using the resource manager will disrupt both client and server features because the bitswap protocol is a message based protocol mixing requests and responses.
References
- GHSA-m974-xj4j-7qv5
- CVE-2023-25568
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/ipfs/kubo | all versions | 0.19.0go get github.com/ipfs/kubo@v0.19.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/ipfs/kubo, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/ipfs/kubo to 0.19.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qvqg-6rp8-4p9h is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is GHSA-qvqg-6rp8-4p9h in your dependencies?
Find it across Go, including transitive dependencies.