{"answers":{"affected":"2 open source packages ship an affected version, including github.com/ipfs/go-ipfs.","exploited":"There is no known exploitation of GHSA-f2gr-7299-487h in the wild and no public exploit code.","fix":"Upgrade github.com/ipfs/go-ipfs to 0.13.1 or later.","what":"GHSA-f2gr-7299-487h is a denial of service vulnerability in github.com/ipfs/go-ipfs, published on 6 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-f2gr-7299-487h and fix it if it is affected.\n\nWhat it is: GHSA-f2gr-7299-487h is a denial of service vulnerability in github.com/ipfs/go-ipfs, published on 6 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-f2gr-7299-487h in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/ipfs/go-ipfs (Go): affected from 0.5.0; fixed in 0.13.1\n- github.com/ipfs/go-ipfs (Go): affected from 0.5.0; fixed in 0.13.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-f2gr-7299-487h/ (Markdown: https://insights.sbomify.com/GHSA-f2gr-7299-487h/index.md)","id":"GHSA-f2gr-7299-487h","markdown":"https://insights.sbomify.com/GHSA-f2gr-7299-487h/index.md","name":"GHSA-f2gr-7299-487h","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"IPFS Go library","requires_auth":"none","summary":"Malformed CAR files cause crashes or memory exhaustion in go-ipfs nodes when imported via untrusted input, requiring dependency upgrades.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\ngo-ipfs nodes crash when trying to import certain malformed CAR files due to an issue in the go-car dependency. This impacts nodes running `ipfs dag import` on untrusted user inputs, for example, pinning services with a car ingest endpoint.\nThis include the corresponding [HTTP RPC API `v0/dag/import`](https://docs.ipfs.io/reference/http/api/#api-v0-dag-import) endpoint.\n\nAn attacker controlling the car file passed in can also make the node allocate arbitrary sized buffers creating memory exhaustion attacks.\n\n### Patches\n0.13.1, 0.14 and later.\n\n#### Forks\nFor those running on forked versions of go-ipfs, simply updating the version of `github.com/ipld/go-car/v2` you are using to \u003e= v2.4.0 should resolve the issue.\n\n#### Libraries consumers\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-car.\n\nYou can check if your Go module has a dependency on go-car by running a command such as `go mod graph | grep go-car`  in your module root.\n\nNote: if you are using other libraries, some parts of go-car (`github.com/ipld/go-car/v2/index/...`) have not fully been fixed yet.  Please see [go-car's security advisory](https://github.com/ipld/go-car/security/advisories/GHSA-9x4h-8wgm-8xfg) for more information.  go-ipfs do not make use of this code.\n\n### Workarounds\nThe best way to work around this is to control exposure to the [HTTP RPC API endpoint for CAR imports](https://docs.ipfs.io/reference/http/api/#api-v0-dag-import) to only work with trusted data.\n\nYou can also validate that the car will not crash go-ipfs by running `car verify` on it first (`go install github.com/ipld/go-car/cmd/car@latest`).\n\n### References\nSee also the [go-car security advisory](https://github.com/ipld/go-car/security/advisories/GHSA-9x4h-8wgm-8xfg).\n\n### For more information\nIf you have any questions or comments about this advisory:\n1. Ask in the [IPFS Discourse](discuss.ipfs.io/)\n1. Ask in the [IPFS Discord #ipld-chatter](https://discord.gg/ipfs)\n1. Open an issue in [go-ipfs](https://github.com/ipfs/go-ipfs)","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"DOS and excessive memory usage when passing untrusted user input to to dag import","id":"GHSA-f2gr-7299-487h","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.13.1"],"introduced":["0.5.0"],"last_affected":[],"package":"github.com/ipfs/go-ipfs","purl":null,"source":"GHSA-f2gr-7299-487h"},{"ecosystem":"Go","fixed":["0.13.1"],"introduced":["0.5.0"],"last_affected":[],"package":"github.com/ipfs/go-ipfs","purl":"pkg:golang/github.com/ipfs/go-ipfs","source":"GHSA-f2gr-7299-487h"}],"products":null,"published":"2022-07-06","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Malformed CAR files cause crashes or memory exhaustion in go-ipfs nodes when imported via untrusted input, requiring dependency upgrades.","url":"https://insights.sbomify.com/GHSA-f2gr-7299-487h/"}