Extract is aA Go library to extract archives in zip, tar.gz or tar.bz2 formats. A maliciously crafted archive may allow an attacker to…
GitHub_M·CWE-22·Published 2024-10-11
Extract is aA Go library to extract archives in zip, tar.gz or tar.bz2 formats. A maliciously crafted archive may allow an attacker to create a symlink outside the extraction target directory. This vulnerability is fixed in 4.0.0. If you're using the Extractor.FS interface, then upgrading to /v4 will require to implement the new methods that have been added.
Extract is aA Go library to extract archives in zip, tar.gz or tar.bz2 formats. A maliciously crafted archive may allow an attacker to create a symlink outside the extraction target directory. This vulnerability is fixed in 4.0.0. If you're using the Extractor.FS interface, then upgrading to /v4 will require to implement the new methods that have been added.
Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. in github.com/codeclysm/extract
### Impact A maliciously crafted archive may allow an attacker to create a symlink outside the extraction target directory. ### Patches Please use version 4.0.0 or later `github.com/codeclysm/extract/v4`. Any previous version is affected by the bug. ### Workarounds No knows workarounds. ### Backward compatibility notes about upgrading to `/v4` from `/v3` If you're not using the `extract.Extractor.FS` interface, you will not face any breaking changes and upgrading should be as simple as changing the import to `/v4`. This should be the case for most of the userbase. If you're using the `Extractor.FS` interface, then upgrading to `/v4` will require to implement the new methods that have been added: ```go type FS interface { Link(string, string) error MkdirAll(string, os.FileMode) error OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) Symlink(string, string) error // The following methods have been added in the /v4 interface: Remove(path string) error Stat(name string) (os.FileInfo, error) Chmod(name string, mode os.FileMode) error } ``` There should be no other breaking changes in the `/v4` API.
Extract es una librería Go para extraer archivos en formato zip, tar.gz o tar.bz2. Un archivo manipulado con fines malintencionados puede permitir a un atacante crear un enlace simbólico fuera del directorio de destino de la extracción. Esta vulnerabilidad se ha corregido en la versión 4.0.0. Si utiliza la interfaz Extractor.FS, la actualización a /v4 requerirá la implementación de los nuevos métodos que se han añadido.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 3.1 | Primary | NVD | 7.5 | 3.9 | 3.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| 3.1 | Secondary | GHSA | 5.3 | — | — | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| 4.0 | Primary | cve.org | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Primary | cve.org | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Secondary | NVD | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| 4.0 | Secondary | GHSA | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |