CVE-2024-24579
stereoscope vulnerable to tar path traversal when processing OCI tar archives
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by GHSA (medium).
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 packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| chainguard | grype, k9s, kubescape and 3 more | 0.74.4-r0 and 5 more |
| go::GitHub Security Advisory Go | github.com/anchore/stereoscope | 0.0.1 |
| minimos | paketo-buildpacks-bundle-install, paketo-buildpacks-bundler, paketo-buildpacks-passenger | 0.9.10-r0 and 2 more |
| wolfi | grype, k9s, kubescape and 3 more | 0.74.4-r0 and 5 more |
Show all 16 entries from 4 sources
| Source | Package | Fixed in |
|---|---|---|
| chainguard | grype | 0.74.4-r0 |
| chainguard | k9s | 0.31.8-r0 |
| chainguard | kubescape | 3.0.3-r7 |
| chainguard | syft | 0.103.1-r0 |
| chainguard | wolfictl | 0.14.13-r0 |
| chainguard | zarf | 0.32.3-r0 |
| go::GitHub Security Advisory Go | github.com/anchore/stereoscope | 0.0.1 |
| minimos | paketo-buildpacks-bundle-install | 0.9.10-r0 |
| minimos | paketo-buildpacks-bundler | 0.9.11-r0 |
| minimos | paketo-buildpacks-passenger | 0.14.23-r0 |
| wolfi | grype | 0.74.4-r0 |
| wolfi | k9s | 0.31.8-r0 |
| wolfi | kubescape | 3.0.3-r7 |
| wolfi | syft | 0.103.1-r0 |
| wolfi | wolfictl | 0.14.13-r0 |
| wolfi | zarf | 0.32.3-r0 |