{"answers":{"affected":"3 open source packages ship an affected version, including github.com/anchore/stereoscope. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24579 exists.","fix":"Upgrade github.com/anchore/stereoscope to 0.0.1 or later.","what":"CVE-2024-24579 is a medium-severity path traversal vulnerability in anchore stereoscope, published on 31 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-24579 and fix it if it is affected.\n\nWhat it is: CVE-2024-24579 is a medium-severity path traversal vulnerability in anchore stereoscope, published on 31 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24579 exists.\n\nAffected packages and fixed versions:\n- github.com/anchore/stereoscope (Go): affected all versions; fixed in 0.0.1\n- github.com/anchore/stereoscope (Go): affected all versions; fixed in 0.0.1\n- github.com/anchore/stereoscope (Go): affected all versions; fixed in 0.0.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/CVE-2024-24579/ (Markdown: https://insights.sbomify.com/CVE-2024-24579/index.md)","id":"CVE-2024-24579","markdown":"https://insights.sbomify.com/CVE-2024-24579/index.md","name":"CVE-2024-24579","record":{"aliases":["GHSA-hpxr-w9w7-g4gv","GO-2024-2490","MINI-3rf8-prxq-hcfv","MINI-4598-v2p2-mw76","MINI-4m3g-8fch-6g2m","MINI-8qj4-cg4m-x5jw","MINI-cvqc-gm78-q2gw","MINI-v29w-hpp9-8fh9"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Go container image library","requires_auth":"none","summary":"Attackers can write files outside the intended directory by crafting malicious OCI tar archives processed by the stereoscope Go library.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"stereoscope","vendor":"anchore"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"stereoscope is a go library for processing container images and simulating a squash filesystem.  Prior to version 0.0.1, it is possible to craft an OCI tar archive that, when stereoscope attempts to unarchive the contents, will result in writing to paths outside of the unarchive temporary directory. Specifically, use of `github.com/anchore/stereoscope/pkg/file.UntarToDirectory()` function, the  `github.com/anchore/stereoscope/pkg/image/oci.TarballImageProvider` struct, or the higher level `github.com/anchore/stereoscope/pkg/image.Image.Read()` function express this vulnerability. As a workaround, if you are using the OCI archive as input into stereoscope then you can switch to using an OCI layout by unarchiving the tar archive and provide the unarchived directory to stereoscope.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Tar path traversal in stereoscope when processing OCI tar archives","id":"CVE-2024-24579","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"Denial of service in Intel(R) Data Center GPU Max Series 1100 and 1550 products","id":"CVE-2024-24580"},"packages":[{"ecosystem":"Go","fixed":["0.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/anchore/stereoscope","purl":null,"source":"GHSA-hpxr-w9w7-g4gv"},{"ecosystem":"Go","fixed":["0.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/anchore/stereoscope","purl":"pkg:golang/github.com/anchore/stereoscope","source":"GHSA-hpxr-w9w7-g4gv"},{"ecosystem":"Go","fixed":["0.0.1"],"introduced":["0"],"last_affected":[],"package":"github.com/anchore/stereoscope","purl":"pkg:golang/github.com/anchore/stereoscope","source":"GO-2024-2490"}],"prev":{"headline":"RaspberryMatic Unauthenticated Remote Code Execution vulnerability through HMServer File Upload","id":"CVE-2024-24578"},"products":["stereoscope"],"published":"2024-01-31","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-23","vendors":["anchore"]},"summary":"Attackers can write files outside the intended directory by crafting malicious OCI tar archives processed by the stereoscope Go library.","url":"https://insights.sbomify.com/CVE-2024-24579/"}