GitHub Advisoryadvisory · Go

GHSA-hpxr-w9w7-g4gv stereoscope vulnerable to tar path traversal when processing OCI tar archives

MEDIUM Published 2024-01-31 Modified 2024-01-31 Official page ↗
Aliases
CVE-2024-24579
Ecosystem
Go
Packages
github.com/anchore/stereoscope
Severity
Moderate
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Weaknesses
CWE-22
Reviewed
2024-01-31

Affected packages

• Go github.com/anchore/stereoscope: < 0.0.1 → fixed in 0.0.1

Description

Impact 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. Patches Patched in v0.0.1 Workarounds 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. References • Patch PR https://github.com/anchore/stereoscope/pull/214

Related

Alias · CVE (1)

  • CVE-2024-24579 stereoscope is a go library for processing container images and simulating a squash filesystem. vulnerability

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References