Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory
Summary
| CVE | CVE-2026-42497 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-05-26 02:16:40 UTC |
| Updated | 2026-05-28 14:16:20 UTC |
| Description | Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory. _make_special_file() passes the tar header's linkname to link() without validating it against absolute paths or .. segments, creating a hardlink that shares the victim file's inode. A subsequent write through the extracted name modifies the victim file, and the post-extraction chmod, chown, and utime block in _extract_file() (guarded only against symlinks via -l) applies the tar header's mode, owner, and timestamps to the shared inode during extraction alone. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS: 0.000180000 probability, percentile 0.048860000 (date 2026-05-27)
Problem Types: CWE-59 | CWE-732 | CWE-59 CWE-59 Improper Link Resolution Before File Access ('Link Following') | CWE-732 CWE-732 Incorrect Permission Assignment for Critical Resource
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| 3.1 | ADP | DECLARED | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
HighAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Archive | tar_project | archive\ | \ | tar |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | BINGOS | ArchiveTar | affected 3.08 custom | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| www.cve.org/CVERecord | 9b29abf9-4ab0-4765-b253-1875cd9b441e | www.cve.org | Third Party Advisory |
| metacpan.org/release/BINGOS/Archive-Tar-3.08/changes | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | Release Notes |
| github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | Patch |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-04-12T00:00:00.000Z | Issue reported. |
| CNA | 2026-05-10T00:00:00.000Z | Version 3.06 released, disabling hardlink extraction by default. |
| CNA | 2026-05-22T00:00:00.000Z | Version 3.08 released. |
Solutions
CNA: Upgrade to Archive::Tar 3.08 or later.
There are currently no legacy QID mappings associated with this CVE.