{"answers":{"affected":"4 open source packages ship an affected version, including github.com/deislabs/oras and oras. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-21272 in the wild and no public exploit code.","fix":"Upgrade github.com/deislabs/oras to 0.9.0 or later.","what":"CVE-2021-21272 is a high-severity path traversal vulnerability in deislabs oras, published on 25 Jan 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-21272 and fix it if it is affected.\n\nWhat it is: CVE-2021-21272 is a high-severity path traversal vulnerability in deislabs oras, published on 25 Jan 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-21272 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/deislabs/oras (Go): affected all versions; fixed in 0.9.0\n- github.com/deislabs/oras (Go): affected all versions; fixed in 0.9.0\n- github.com/deislabs/oras (Go): affected all versions; fixed in 0.9.0\n- oras (Bitnami): affected from 0.4.0; fixed in 0.9.0\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-2021-21272/ (Markdown: https://insights.sbomify.com/CVE-2021-21272/index.md)","id":"CVE-2021-21272","markdown":"https://insights.sbomify.com/CVE-2021-21272/index.md","name":"CVE-2021-21272","record":{"aliases":["BIT-oras-2021-21272","GHSA-g5v4-5x39-vwhx","GO-2021-0099","openSUSE-SU-2024:12345-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Go OCI artifact library","requires_auth":"low_privilege","summary":"A zip-slip vulnerability in ORAS allows malicious tarballs to overwrite files outside the target directory, potentially leading to code execution or data modification.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"oras","vendor":"deislabs"}],"cvss":{"score":7.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"ORAS is open source software which enables a way to push OCI Artifacts to OCI Conformant registries. ORAS is both a CLI for initial testing and a Go Module. In ORAS from version 0.4.0 and before version 0.9.0, there is a \"zip-slip\" vulnerability. The directory support feature allows the downloaded gzipped tarballs to be automatically extracted to the user-specified directory where the tarball can have symbolic links and hard links. A well-crafted tarball or tarballs allow malicious artifact providers linking, writing, or overwriting specific files on the host filesystem outside of the user-specified directory unexpectedly with the same permissions as the user who runs `oras pull`. Users of the affected versions are impacted if they are `oras` CLI users who runs `oras pull`, or if they are Go programs, which invoke `github.com/deislabs/oras/pkg/content.FileStore`. The problem has been fixed in version 0.9.0. For `oras` CLI users, there is no workarounds other than pulling from a trusted artifact provider. For `oras` package users, the workaround is to not use `github.com/deislabs/oras/pkg/content.FileStore`, and use other content stores instead, or pull from a trusted artifact provider.","ecosystems":["Bitnami","Go","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"zip slip in ORAS","id":"CVE-2021-21272","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":5,"n_references":4,"next":{"headline":"Open redirects on some federation and push requests","id":"CVE-2021-21273"},"packages":[{"ecosystem":"Bitnami","fixed":["0.9.0"],"introduced":["0.4.0"],"last_affected":[],"package":"oras","purl":"pkg:bitnami/oras","source":"BIT-oras-2021-21272"},{"ecosystem":"Go","fixed":["0.9.0"],"introduced":["0"],"last_affected":[],"package":"github.com/deislabs/oras","purl":null,"source":"GHSA-g5v4-5x39-vwhx"},{"ecosystem":"Go","fixed":["0.9.0"],"introduced":["0"],"last_affected":[],"package":"github.com/deislabs/oras","purl":"pkg:golang/github.com/deislabs/oras","source":"GHSA-g5v4-5x39-vwhx"},{"ecosystem":"Go","fixed":["0.9.0"],"introduced":["0"],"last_affected":[],"package":"github.com/deislabs/oras","purl":"pkg:golang/github.com/deislabs/oras","source":"GO-2021-0099"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.9.4-3.1"],"introduced":["0"],"last_affected":[],"package":"helm","purl":"pkg:rpm/opensuse/helm\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12345-1"}],"prev":{"headline":"Denial of service in TenderMint Core","id":"CVE-2021-21271"},"products":["oras"],"published":"2021-01-25","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["deislabs"]},"summary":"A zip-slip vulnerability in ORAS allows malicious tarballs to overwrite files outside the target directory, potentially leading to code execution or data modification.","url":"https://insights.sbomify.com/CVE-2021-21272/"}