{"id":"CVE-2024-47877","aliases":["GHSA-8rm2-93mq-jqhc","GO-2024-3196"],"url":"https://o3.security/vulnerability/CVE-2024-47877","summary":"Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory.","details":"### 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.\n","published":"2024-10-11T16:36:29.763Z","modified":"2026-08-12T03:51:20.607248245Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/codeclysm/extract/v3","fixedVersion":null},{"ecosystem":"Go","name":"github.com/codeclysm/extract/v4","fixedVersion":"4.0.0"},{"ecosystem":"Go","name":"github.com/codeclysm/extract","fixedVersion":null}],"fix":{"url":"https://github.com/codeclysm/extract/commit/4a98568021b8e289345c7f526ccbd7ed732cf286","label":"codeclysm/extract@4a98568"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47877.json"},{"type":"ADVISORY","url":"https://github.com/codeclysm/extract/security/advisories/GHSA-8rm2-93mq-jqhc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47877"},{"type":"FIX","url":"https://github.com/codeclysm/extract/commit/4a98568021b8e289345c7f526ccbd7ed732cf286"},{"type":"PACKAGE","url":"https://github.com/codeclysm/extract"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:20.607248245Z"}}