Vulnerabilities in pkg:golang/github.com/ipfs/go-bitswap
PACKAGEGHSA-q3j6-22wf-3jh9 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/ipfs/go bitswap libraries in the Go ecosystem. The issue involves github.com/ipfs/go-bitswap vulnerable to dos unbounded persistent memory leak. Remediation is available by upgrading affected packages to version 0.12.0.
pkg:golang/github.com/ipfs/go-bitswap
Vulnerability advisories affecting package pkg:golang/github.com/ipfs/go-bitswap. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-q3j6-22wf-3jh9 | - | HIGH | github.com/ipfs/go-bitswap vulnerable to DOS unbounded persistent memory leak |
GHSA-q3j6-22wf-3jh9 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-q3j6-22wf-3jh9
To remediate this vulnerability, upgrade all affected Github.com/ipfs/go bitswap dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/ipfs/go-bitswap to 0.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ipfs/go-bitswap
How to Check if You Are Affected
To determine whether your application is affected by GHSA-q3j6-22wf-3jh9, inspect your project dependencies for Github.com/ipfs/go bitswap:
inspect dependencies for github.com/ipfs/go-bitswap
Analyze the terminal output to locate any version of Github.com/ipfs/go bitswap in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/ipfs/go bitswap, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-q3j6-22wf-3jh9 Affected Github.com/ipfs/go bitswap Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ipfs/go-bitswap
|
Go |
< 0.12.0
|
0.12.0
|
References
Frequently Asked Questions
What is GHSA-q3j6-22wf-3jh9?
Which Github.com/ipfs/go bitswap versions are affected?
What version fixes GHSA-q3j6-22wf-3jh9?
Is github.com/ipfs/go-bitswap affected?
What is the CVSS score of GHSA-q3j6-22wf-3jh9?
What CWE is associated with GHSA-q3j6-22wf-3jh9?
How can I check Go dependencies for GHSA-q3j6-22wf-3jh9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q3j6-22wf-3jh9",
"modified" : "2023-05-11T20:39:55Z",
"published" : "2023-05-11T20:39:55Z",
"aliases" : [ ],
"summary" : "github.com/ipfs/go-bitswap vulnerable to DOS unbounded persistent memory leak",
"details" : "This package has been moved to [`github.com/ipfs/boxo/bitswap`](https://pkg.go.dev/github.com/ipfs/boxo/bitswap), this vulnerability is tracked there: https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 (`CVE-2023-25568`)\n\n### Remediation\nThis is a two step process:\n1. Apply one of:\n - (**recommended**) upgrade from `github.com/ipfs/go-bitswap` to `github.com/ipfs/boxo/bitswap`.\n - If you are still using `github.com/ipfs/go-bitswap` and cannot upgrade to `boxo`, you can upgrade to `github.com/ipfs/go-bitswap@v0.12.0`, this will replace the `go-bitswap` implementation by stubs which points to `boxo`.\n2. Open https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 and then follow `boxo`'s remediation section.\n\n### Vulnerable symbols\n- `>= v0.9.0; < v0.12.0`\n - `github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).MessageReceived`\n - `github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).NotifyNewBlocks`\n - `github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).findOrCreate`\n - `github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).PeerConnected`\n- `v0.8.0`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceived`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).NotifyNewBlocks`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreate`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected`\n- `< v0.8.0`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceived`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).receiveBlocksFrom`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreate`\n - `github.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected`\n\n### Workarounds\nIf 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`](https://pkg.go.dev/github.com/ipfs/go-bitswap/client).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ipfs/go-bitswap"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5"
}, {
"type" : "WEB",
"url" : "https://github.com/ipfs/go-bitswap/security/advisories/GHSA-q3j6-22wf-3jh9"
}, {
"type" : "WEB",
"url" : "https://github.com/ipfs/go-libipfs/security/advisories/GHSA-m974-xj4j-7qv5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25568"
}, {
"type" : "WEB",
"url" : "https://github.com/ipfs/boxo/commit/62cbac40b96f49e39cd7fedc77ee6b56adce4916"
}, {
"type" : "WEB",
"url" : "https://github.com/ipfs/boxo/commit/9cb5cb54d40b57084d1221ba83b9e6bb3fcc3197"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ipfs/go-bitswap"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-05-11T20:39:55Z",
"nvd_published_at" : null
}
}