CVE-2024-24579: stereoscope vulnerable to tar path traversal when processing OCI tar archives
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…
Published Jan 31, 2024 · Updated Feb 2, 2024
Affected packages
github.com/anchore/stereoscope
- Ecosystem
- Go
- Affected
- < 0.0.1
- Fixed in
- 0.0.1
- Check
go list -m github.com/anchore/stereoscope
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
Credited to wagoodman, joshbressers, nurmi.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
