5.3medium
Tar path traversal in stereoscope when processing OCI tar archives
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.39% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hpxr-w9w7-g4gvGO-2024-2490
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
| Product or package | Versions | Reported by |
|---|---|---|
| anchore stereoscope | < 0.0.1, before 0.0.1 | CVE List, NVD |
| github.com/anchore/stereoscope (Go) | before 0.0.1 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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
Go Vulnerability Database
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.
NVD (es)
stereoscope es una liibrería para procesar imágenes de contenedores y simular un sistema de archivos squash. Antes de la versión 0.0.1, era posible crear un archivo tar OCI que, cuando stereoscope intenta desarchivar el contenido, se escribiría en rutas fuera del directorio temporal de desarchivado. Específicamente, el uso de la función `github.com/anchore/stereoscope/pkg/file.UntarToDirectory()`, la estructura `github.com/anchore/stereoscope/pkg/image/oci.TarballImageProvider` o el nivel superior `github. com/anchore/stereoscope/pkg/image.Image.Read()` expresa esta vulnerabilidad. Como workaround, si está utilizando el archivo OCI como entrada en el estereoscopio, puede pasar a utilizar un diseño OCI desarchivando el archivo tar y proporcionando el directorio desarchivado al estereoscopio.
References
| https://github.com/anchore/stereoscope/security/advisories/GHSA-hpxr-w9w7-g4gv | advisory, third-party-advisory, web | |
| https://github.com/anchore/stereoscope/commit/09dacab4d9ee65ee8bc7af8ebf4aa7b5aaa36204 | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-24579 | advisory | |
| https://github.com/anchore/stereoscope | package | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-24579 changed 2024-08-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hpxr-w9w7-g4gv changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-2490 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2024-24579 changed 2026-06-17 | Public domain |