Are you affected by GHSA-Q3J6-22WF-3JH9?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)GHSA-Q3J6-22WF-3JH9
github.com/ipfs/go-bitswap vulnerable to DOS unbounded persistent memory leak
Overview
Description
This package has been moved to github.com/ipfs/boxo/bitswap, this vulnerability is tracked there: https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 (CVE-2023-25568)
Remediation
This is a two step process:
- Apply one of:
- (recommended) upgrade from
github.com/ipfs/go-bitswaptogithub.com/ipfs/boxo/bitswap. - If you are still using
github.com/ipfs/go-bitswapand cannot upgrade toboxo, you can upgrade togithub.com/ipfs/go-bitswap@v0.12.0, this will replace thego-bitswapimplementation by stubs which points toboxo.
- (recommended) upgrade from
- Open https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 and then follow
boxo's remediation section.
Vulnerable symbols
>= v0.9.0; < v0.12.0github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).MessageReceivedgithub.com/ipfs/go-bitswap/server/internal/decision.(*Engine).NotifyNewBlocksgithub.com/ipfs/go-bitswap/server/internal/decision.(*Engine).findOrCreategithub.com/ipfs/go-bitswap/server/internal/decision.(*Engine).PeerConnected
v0.8.0github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceivedgithub.com/ipfs/go-bitswap/internal/decision.(*Engine).NotifyNewBlocksgithub.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreategithub.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected
< v0.8.0github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceivedgithub.com/ipfs/go-bitswap/internal/decision.(*Engine).receiveBlocksFromgithub.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreategithub.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected
Workarounds
If you are using the stubs at github.com/ipfs/go-bitswap and not taking advantage of the features provided by the server, refactoring your code to use the new split API will allows you to run in a client-only mode using: github.com/ipfs/go-bitswap/client.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by GitHub.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Go | github.com/ipfs/go-bitswap | <0.12.0 | 0.12.0 |
Open a package to see all its vulnerabilities.
Operating systems
No Linux distribution reports this ID.
References
- github.com https://github.com/ipfs/boxo/commit/62cbac40b96f49e39cd7fedc77ee6b56adce4916
- github.com https://github.com/ipfs/boxo/commit/9cb5cb54d40b57084d1221ba83b9e6bb3fcc3197
- github.com https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5
- github.com https://github.com/ipfs/go-bitswap
- github.com https://github.com/ipfs/go-bitswap/security/advisories/GHSA-q3j6-22wf-3jh9
- github.com https://github.com/ipfs/go-libipfs/security/advisories/GHSA-m974-xj4j-7qv5
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-25568
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.