{"answers":{"affected":"3 open source packages ship an affected version, including github.com/ipfs/go-ipfs.","exploited":"There is no known exploitation of GHSA-fx5p-f64h-93xc in the wild and no public exploit code.","fix":"Upgrade github.com/ipfs/go-ipfs to 0.12.1 or later.","what":"GHSA-fx5p-f64h-93xc is a vulnerability in github.com/ipfs/go-ipfs, published on 4 Apr 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-fx5p-f64h-93xc and fix it if it is affected.\n\nWhat it is: GHSA-fx5p-f64h-93xc is a vulnerability in github.com/ipfs/go-ipfs, published on 4 Apr 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-fx5p-f64h-93xc in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/ipfs/go-ipfs (Go): affected from 0.11.0; fixed in 0.12.1\n- github.com/ipfs/go-ipfs (Go): affected from 0.11.0; fixed in 0.12.1\n- github.com/ipfs/go-ipfs (Go): affected from 0.11.0; fixed in 0.12.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-fx5p-f64h-93xc/ (Markdown: https://insights.sbomify.com/GHSA-fx5p-f64h-93xc/index.md)","id":"GHSA-fx5p-f64h-93xc","markdown":"https://insights.sbomify.com/GHSA-fx5p-f64h-93xc/index.md","name":"GHSA-fx5p-f64h-93xc","record":{"aliases":["GO-2022-0418"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"configuration_change","impacts":["security_bypass","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"IPFS Docker configuration","requires_auth":"none","summary":"Default Docker configuration exposes the IPFS admin API to the public network, allowing unauthorized access to node management functions.","user_interaction":"not_required","vuln_class":"misconfiguration"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nAllows admin API access to the IPFS node.\n\n### Who ?\n\nThis affects people running the  [docker-compose.yaml](https://github.com/ipfs/go-ipfs/blob/master/docker-compose.yaml) service in an environment where the docker host is directly attached to a public or untrusted IP.  In the vulnerable version, the private API endpoint is publicly forwarded by exposing it as `0.0.0.0:5001` on the host machine.  \n\nIf the host machine is hidden behind a firewall or NAT (and the LAN is trusted for NAT), this is not an immediate issue because of the protection from the firewall or NAT.  That said, we still recommend users update to follow security best practices of not putting unnecessary dependency on a working firewall.\n\n### Patches\nThis issue is in [docker-compose.yaml](https://github.com/ipfs/go-ipfs/blob/master/docker-compose.yaml).  Users need to replace their current `docker-compose.yaml` file with a version `0.12.1` or later.\n\nThere is no need to update any of the binaries. Users running previous versions like `0.12.0` or earlier can download the `0.12.1` `docker-compose.yaml` file.  You can replace a vulnerable `docker-compose.yaml` file with a the new one with:\n\n```\ncurl https://raw.githubusercontent.com/ipfs/go-ipfs/v0.12.1/docker-compose.yaml \u003e docker-compose.yaml\n```\n\n### How to test if you are vulnerable\n#### Binding check on the host\nOn the host machine, while IPFS is running, run as root:\n\n```bash\nnetstat -lnp | grep \":5001\"\n```\n\nThe output will be a list of listeners bound to `:5001`.\nYou then need to check that those listeners are private and preferably even localhost IPs.\n⚠️ If this listener is on `0.0.0.0` or a public IP you are very likely vulnerable.\n\n#### Remote hailing\nWhile IPFS is running, you can try to contact the API from a remote machine. (Replace `1.2.3.4` with your node public IP.  Or if you want to test in an untrusted NAT, then substitute the LAN IP instead.)\n\n```bash\ncurl -X POST http://1.2.3.4:5001/api/v0/version\n```\n\n⚠️ If you see any json outputted (e.g.,  `{\"Commit\": \"\u003cstring\u003e\",\"Golang\": \"\u003cstring\u003e\",\"Repo\": \"\u003cstring\u003e\",\"System\": \"\u003cstring\u003e\",\"Version\": \"\u003cstring\u003e\"}`), then you are vulnerable.\n\nIf it **fails**, then you are safe.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Please first read https://docs.ipfs.io/reference/http/api/ about best practices\n* Ask in [IPFS Discord #ipfs-chatter](https://discord.gg/ipfs)\n* 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":"Opened exploitable ports in default docker-compose.yaml in go-ipfs","id":"GHSA-fx5p-f64h-93xc","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"misconfiguration","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.12.1"],"introduced":["0.11.0"],"last_affected":[],"package":"github.com/ipfs/go-ipfs","purl":null,"source":"GHSA-fx5p-f64h-93xc"},{"ecosystem":"Go","fixed":["0.12.1"],"introduced":["0.11.0"],"last_affected":[],"package":"github.com/ipfs/go-ipfs","purl":"pkg:golang/github.com/ipfs/go-ipfs","source":"GHSA-fx5p-f64h-93xc"},{"ecosystem":"Go","fixed":["0.12.1"],"introduced":["0.11.0"],"last_affected":[],"package":"github.com/ipfs/go-ipfs","purl":"pkg:golang/github.com/ipfs/go-ipfs","source":"GO-2022-0418"}],"products":null,"published":"2022-04-04","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Default Docker configuration exposes the IPFS admin API to the public network, allowing unauthorized access to node management functions.","url":"https://insights.sbomify.com/GHSA-fx5p-f64h-93xc/"}