{"id":"GHSA-hpxr-w9w7-g4gv","summary":"stereoscope vulnerable to tar path traversal when processing OCI tar archives","details":"### Impact\nIt 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.\n\n### Patches\nPatched in v0.0.1\n\n### Workarounds\nIf you are using the OCI archive as input into stereoscope then you can switch to using an [OCI layout](https://github.com/opencontainers/image-spec/blob/main/image-layout.md) by unarchiving the tar archive and provide the unarchived directory to stereoscope.\n\n### References\n- Patch PR https://github.com/anchore/stereoscope/pull/214","aliases":["CVE-2024-24579","GO-2024-2490"],"modified":"2026-07-17T21:05:11.450874043Z","published":"2024-01-31T22:39:17Z","database_specific":{"nvd_published_at":"2024-01-31T17:15:40Z","cwe_ids":["CWE-22"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2024-01-31T22:39:17Z"},"references":[{"type":"WEB","url":"https://github.com/anchore/stereoscope/security/advisories/GHSA-hpxr-w9w7-g4gv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24579"},{"type":"WEB","url":"https://github.com/anchore/stereoscope/commit/09dacab4d9ee65ee8bc7af8ebf4aa7b5aaa36204"},{"type":"PACKAGE","url":"https://github.com/anchore/stereoscope"}],"affected":[{"package":{"name":"github.com/anchore/stereoscope","ecosystem":"Go","purl":"pkg:golang/github.com/anchore/stereoscope"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/01/GHSA-hpxr-w9w7-g4gv/GHSA-hpxr-w9w7-g4gv.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"}]}