FlawAtlas
Search the atlas
CVE-2024-47877 Moderate

Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. in github.com/codeclysm/extract

Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. in github.com/codeclysm/extract

Exploit probability 0.5%
Published October 15, 2024
Required by Not available
Last source change March 3, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

13 explicit affected versions

Go github.com/codeclysm/extract
Go github.com/codeclysm/extract/v3
Go github.com/codeclysm/extract/v4
Go github.com/codeclysm/extract
Go github.com/codeclysm/extract/v3
Go github.com/codeclysm/extract/v4

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities GO-2024-3196

Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. in github.com/codeclysm/extract

View original source
Open Source Vulnerabilities GHSA-8rm2-93mq-jqhc

### 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.

View original source
Open Source Vulnerabilities CVE-2024-47877

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.

View original source

05 / REFERENCES

Further evidence