Vulnerabilities in pkg:golang/github.com/ipld/go-ipfs
PACKAGEGHSA-mcq2-w56r-5w2w is a HIGH daemon panics when processing certain vulnerability (General Security Weakness) affecting Github.com/ipld/go ipfs libraries in the Go ecosystem. The issue involves daemon panics when processing certain blocks. Remediation is available by upgrading affected packages to version 0.12.2, 0.11.1.
pkg:golang/github.com/ipld/go-ipfs
Vulnerability advisories affecting package pkg:golang/github.com/ipld/go-ipfs. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mcq2-w56r-5w2w | - | HIGH | Daemon panics when processing certain blocks |
GHSA-mcq2-w56r-5w2w at a Glance
How to Fix GHSA-mcq2-w56r-5w2w
To remediate this vulnerability, upgrade all affected Github.com/ipld/go ipfs 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/ipld/go-ipfs to 0.12.2
Upgrade github.com/ipld/go-ipfs to 0.11.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/ipld/go-ipfs
How to Check if You Are Affected
To determine whether your application is affected by GHSA-mcq2-w56r-5w2w, inspect your project dependencies for Github.com/ipld/go ipfs:
inspect dependencies for github.com/ipld/go-ipfs
Analyze the terminal output to locate any version of Github.com/ipld/go ipfs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.2), 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 General Security Weakness. In Github.com/ipld/go ipfs, 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-mcq2-w56r-5w2w Affected Github.com/ipld/go ipfs Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/ipld/go-ipfs
|
Go |
≥ 0.12.0
< 0.12.2
|
0.12.2
|
|
github.com/ipld/go-ipfs
|
Go |
< 0.11.1
|
0.11.1
|
References
Frequently Asked Questions
What is GHSA-mcq2-w56r-5w2w?
Which Github.com/ipld/go ipfs versions are affected?
What version fixes GHSA-mcq2-w56r-5w2w?
Is github.com/ipld/go-ipfs affected?
What CWE is associated with GHSA-mcq2-w56r-5w2w?
How can I check Go dependencies for GHSA-mcq2-w56r-5w2w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mcq2-w56r-5w2w",
"modified" : "2022-04-08T22:09:23Z",
"published" : "2022-04-08T22:09:23Z",
"aliases" : [ ],
"summary" : "Daemon panics when processing certain blocks",
"details" : "### Impact\ngo-ipfs nodes with versions 0.10.0, 0.11.0, 0.12.0, or 0.12.1 can crash when trying to traverse certain malformed graphs due to an issue in the go-codec-dagpb dependency. Vulnerable nodes that work with these malformed graphs may crash leading to denial-of-service risks.\n\nThis particularly impacts nodes that download or export data that is controlled by external user input as there is the possibility that a malicious user of those services could (intentionally or unintentionally) cause the node to traverse a malformed graph. Some notable use cases include public gateways and pinning services which fetch data on behalf of users, as well as applications such as IPFS Companion which load data based on a user visiting a website with links to IPFS URLs.\n\n### Patches\nVersions v0.11.1 and v0.12.2 both resolve this issue. This should make it easy to upgrade, even if you have not yet performed the v0.12.0 migration.\n\nFor those running on forked versions of go-ipfs or who are on v0.10.0 and are having trouble with the v0.11.0 breaking changes, simply updating the version of `go-codec-dagpb` you are using to >=v1.3.2 should resolve the issue.\n\nAny users of libraries within the go-ipfs ecosystem, even if not the go-ipfs package or binary itself, may be affected and should upgrade their dependency on go-codec-dagpb. You can check if your Go module has a dependency on `go-codec-dagpb` by running a command such as `go mod graph | grep go-codec-dagpb` in your module root.\n\n### Workarounds\nThe best way to workaround this issue is to control exposure to any endpoints that allow for arbitrary IPLD traversals. This primarily includes the HTTP RPC API (https://docs.ipfs.io/reference/http/api ) and the Gateway API. If you are exposing those APIs, then do so within an environment where only trusted users and applications you control have access to it. You should be safe as long as your users and applications do not create malformed graphs, which should not happen using standard `go-ipfs` tooling.\n\nIf you previously had a more open access environment, then closing off access will only be sufficient if both of the following are true:\n* The experimental GraphSync feature is disabled (https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#graphsync) \n* The only data being accessed is non-malformed data\n\n### References\nSee also the [go-codec-dagpb security advisory](https://github.com/ipld/go-codec-dagpb/security/advisories/GHSA-g3vv-g2j5-45f2).\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Ask in [IPFS Discord #ipfs-chatter](https://discord.gg/ipfs)\n* Open an issue in [go-ipfs](https://github.com/ipld/go-ipfs)",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ipld/go-ipfs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.12.0"
}, {
"fixed" : "0.12.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/ipld/go-ipfs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.11.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ipfs/go-ipfs/security/advisories/GHSA-mcq2-w56r-5w2w"
}, {
"type" : "PACKAGE",
"url" : "github.com/ipld/go-ipfs"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-08T22:09:23Z",
"nvd_published_at" : null
}
}