CVE-2026-42497
Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory
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.
INFO
Published Date :
May 26, 2026, 2:16 a.m.
Last Modified :
July 24, 2026, 11:10 a.m.
Remotely Exploit :
Yes !
Source :
9b29abf9-4ab0-4765-b253-1875cd9b441e
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | HIGH | [email protected] | ||||
| CVSS 3.1 | HIGH | 134c704f-9b21-4f2e-91b3-4a467353bcc0 |
Solution
- Update Archive::Tar to version 3.08 or later.
- Verify extraction logic for untrusted archives.
- Implement strict path validation during extraction.
Public PoC/Exploit Available at Github
CVE-2026-42497 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-42497.
| URL | Resource |
|---|---|
| https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch | Patch |
| https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes | Release Notes |
| https://www.cve.org/CVERecord?id=CVE-2026-42496 | Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-42497 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-42497
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Contour art generator with a web UI. Tweak noise, colors and line styles, then export at any resolution.
Python HTML CSS Dockerfile Shell JavaScript
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-42497 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-42497 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Jul. 24, 2026
Action Type Old Value New Value Added Translation Title: Archive::Tar de BINGOS, Description: Las versiones de Archive::Tar anteriores a la 3.08 para Perl extraen enlaces duros a rutas controladas por el atacante fuera del directorio de extracción. _make_special_file() pasa el linkname del encabezado tar a link() sin validarlo contra rutas absolutas o segmentos '..', creando un enlace duro que comparte el inodo del archivo víctima. Una escritura posterior a través del nombre extraído modifica el archivo víctima, y el bloque chmod, chown y utime posterior a la extracción en _extract_file() (protegido solo contra enlaces simbólicos a través de -l) aplica el modo, propietario y marcas de tiempo del encabezado tar al inodo compartido solo durante la extracción. -
CVE Modified by 9b29abf9-4ab0-4765-b253-1875cd9b441e
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://github.com/jib/archive-tar-new', 'vendor': 'BINGOS', 'product': 'Archive::Tar', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': '3.08', 'versionType': 'custom'}], 'packageName': 'Archive-Tar', 'programFiles': ['lib/Archive/Tar.pm'], 'collectionURL': 'https://cpan.org/modules', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'Archive::Tar::_make_special_file'}, {'name': 'Archive::Tar::_extract_file'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-42497', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-05-28T13:13:55.750345Z'} -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
May. 28, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N -
Initial Analysis by [email protected]
May. 27, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N Added CPE Configuration OR *cpe:2.3:a:archive::tar_project:archive::tar:*:*:*:*:*:perl:*:* versions up to (excluding) 3.08 Added Reference Type CPANSec: https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch Types: Patch Added Reference Type CPANSec: https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes Types: Release Notes Added Reference Type CPANSec: https://www.cve.org/CVERecord?id=CVE-2026-42496 Types: Third Party Advisory -
New CVE Received by 9b29abf9-4ab0-4765-b253-1875cd9b441e
May. 26, 2026
Action Type Old Value New Value Added 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. Added CWE CWE-59 Added CWE CWE-732 Added Reference https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch Added Reference https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes Added Reference https://www.cve.org/CVERecord?id=CVE-2026-42496