{"id":"CVE-2024-47877","aliases":["CVE-2024-47877","GHSA-8rm2-93mq-jqhc","GO-2024-3196"],"related":[],"kind":"vulnerability","state":"published","title":"Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory.","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nA maliciously crafted archive may allow an attacker to create a symlink outside the extraction target directory.\n\n### Patches\nPlease use version 4.0.0 or later `github.com/codeclysm/extract/v4`. Any previous version is affected by the bug.\n\n### Workarounds\nNo knows workarounds.\n\n### Backward compatibility notes about upgrading to `/v4` from `/v3`\n\nIf 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.\n\nIf you're using the `Extractor.FS` interface, then upgrading to `/v4` will require to implement the new methods that have been added:\n\n```go\ntype FS interface {\n    Link(string, string) error\n    MkdirAll(string, os.FileMode) error\n    OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)\n    Symlink(string, string) error\n\n    // The following methods have been added in the /v4 interface:\n\n    Remove(path string) error\n    Stat(name string) (os.FileInfo, error)\n    Chmod(name string, mode os.FileMode) error\n}\n```\n\nThere should be no other breaking changes in the `/v4` API.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. in github.com/codeclysm/extract","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-10-11T16:36:29.763Z","modified":"2026-06-17T07:57:54.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-22","CWE-61"],"affected":[{"ranges":[{"version":"< 4.0.0","status":"affected"}],"vendor":"codeclysm","product":"extract","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.0.0","status":"affected"}],"vendor":"codeclysm","product":"extract","cpe":"cpe:2.3:a:codeclysm:extract:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"3.1.1"}],"ecosystem":"Go","package":"github.com/codeclysm/extract/v3","purl":"pkg:golang/github.com/codeclysm/extract/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.0.0"}],"ecosystem":"Go","package":"github.com/codeclysm/extract/v4","purl":"pkg:golang/github.com/codeclysm/extract/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"2.2.0"}],"ecosystem":"Go","package":"github.com/codeclysm/extract","purl":"pkg:golang/github.com/codeclysm/extract","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/codeclysm/extract","purl":"pkg:golang/github.com/codeclysm/extract","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/codeclysm/extract/v3","purl":"pkg:golang/github.com/codeclysm/extract/v3","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.0.0"}],"ecosystem":"Go","package":"github.com/codeclysm/extract/v4","purl":"pkg:golang/github.com/codeclysm/extract/v4","source":"go"},{"ranges":[{"status":"affected","fixed":"4.0.0"}],"vendor":"codeclysm","product":"extract","cpe":"cpe:2.3:a:codeclysm:extract:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/codeclysm/extract/security/advisories/GHSA-8rm2-93mq-jqhc","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/codeclysm/extract/commit/4a98568021b8e289345c7f526ccbd7ed732cf286","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47877","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/codeclysm/extract","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-10-11T17:43:37.934Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47877","url":"https://www.cve.org/CVERecord?id=CVE-2024-47877","licence":"CVE Terms of Use","modified":"2024-10-11T17:49:34.466Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8rm2-93mq-jqhc","url":"https://github.com/advisories/GHSA-8rm2-93mq-jqhc","licence":"CC-BY-4.0","modified":"2024-10-15T19:53:17.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3196","url":"https://pkg.go.dev/vuln/GO-2024-3196","licence":"CC-BY-4.0","modified":"2026-03-03T04:55:53.051Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47877","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47877","licence":"Public domain","modified":"2026-06-17T07:57:54.163Z"}],"updatedAt":"2026-11-25T22:58:46.687Z","epss":{"score":0.00548,"percentile":0.47312,"date":"2026-12-01T12:00:22.000Z"}}