Skip to content
OpenAdvisories
Medium · 5.3 CVE-2024-24579 EUVD-2024-0369GHSA-hpxr-w9w7-g4gvGO-2024-2490

Tar path traversal in stereoscope when processing OCI tar archives

Published Jan 31, 2024 · Updated Aug 23, 2024 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
anchore stereoscope < 0.0.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling grype 0.74.4-r0 —
Wolfi rolling k9s 0.31.8-r0 —
Wolfi rolling kubescape 3.0.3-r7 —
Wolfi rolling syft 0.103.1-r0 —
Wolfi rolling wolfictl 0.14.13-r0 —
Wolfi rolling zarf 0.32.3-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/anchore/stereoscope < 0.0.1 0.0.1 GHSA-hpxr-w9w7-g4gv

References