Vulnerabilities in pkg:golang/github.com/codeclysm/extract/v3
PACKAGECVE-2024-47877 is a MODERATE (CVSS 5.3) extract has insufficient checks allowing vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting Github.com/codeclysm/extract/v3 libraries in the Go ecosystem. The issue involves extract has insufficient checks allowing attacker to create symlinks outside the extraction directory.. Remediation is available by upgrading affected packages to version 4.0.0.
pkg:golang/github.com/codeclysm/extract/v3
Vulnerability advisories affecting package pkg:golang/github.com/codeclysm/extract/v3. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-8rm2-93mq-jqhc | CVE-2024-47877 | MODERATE | Extract has insufficient checks allowing attacker to create symlinks outside the extraction directory. |
CVE-2024-47877 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2024-47877
To remediate this vulnerability, upgrade all affected Github.com/codeclysm/extract/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/codeclysm/extract/v3 to Latest secure release
Upgrade github.com/codeclysm/extract/v4 to 4.0.0
Upgrade github.com/codeclysm/extract to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/codeclysm/extract/v3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-47877, inspect your project dependencies for Github.com/codeclysm/extract/v3:
inspect dependencies for github.com/codeclysm/extract/v3
Analyze the terminal output to locate any version of Github.com/codeclysm/extract/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Github.com/codeclysm/extract/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-47877 Affected Github.com/codeclysm/extract/v3 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/codeclysm/extract/v3
|
Go |
≤ 3.1.1
|
|
|
github.com/codeclysm/extract/v4
|
Go |
< 4.0.0
|
4.0.0
|
|
github.com/codeclysm/extract
|
Go |
≤ 2.2.0
|
|
References
Frequently Asked Questions
What is CVE-2024-47877?
Which Github.com/codeclysm/extract/v3 versions are affected?
What version fixes CVE-2024-47877?
Is github.com/codeclysm/extract/v3 affected?
Is github.com/codeclysm/extract/v4 affected?
What is the CVSS score of CVE-2024-47877?
What CWE is associated with CVE-2024-47877?
How can I check Go dependencies for CVE-2024-47877?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8rm2-93mq-jqhc",
"modified" : "2024-10-15T19:53:17Z",
"published" : "2024-10-11T18:10:24Z",
"aliases" : [ "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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/codeclysm/extract/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/codeclysm/extract/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.0.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/codeclysm/extract"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"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" : "WEB",
"url" : "https://github.com/codeclysm/extract/commit/4a98568021b8e289345c7f526ccbd7ed732cf286"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/codeclysm/extract"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-61" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-11T18:10:24Z",
"nvd_published_at" : "2024-10-11T17:15:04Z"
}
}