CVE-2026-42496
Received Received - Intake
BaseFortify

Publication date: 2026-05-26

Last updated on: 2026-05-26

Assigner: CPANSec

Description
Archive::Tar versions before 3.08 for Perl extract symlinks with attacker controlled targets outside the extraction directory. _make_special_file() passes the tar header's linkname to symlink() without validating it against absolute paths or .. segments. The secure-extract mode check that guards regular file extraction does not cover the symlink target. A subsequent open through the extracted name reads or writes the attacker chosen path.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-26
Last Modified
2026-05-26
Generated
2026-05-26
AI Q&A
2026-05-26
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-59 The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The vulnerability exists in Archive::Tar versions before 3.08 for Perl, where the module extracts symbolic links (symlinks) with attacker-controlled targets outside the intended extraction directory.

Specifically, the _make_special_file() function passes the tar header's linkname directly to the symlink() system call without validating whether the target is an absolute path or contains directory traversal sequences like "..".

While there is a secure-extract mode that guards regular file extraction, it does not check symlink targets, allowing an attacker to create symlinks pointing outside the extraction directory.

This can lead to subsequent file operations (like open) on these symlinked paths, potentially reading or writing files outside the intended directory.


How can this vulnerability impact me? :

This vulnerability can allow an attacker to perform directory traversal attacks by creating symlinks that point outside the extraction directory.

As a result, an attacker could cause the application to read from or write to arbitrary files on the filesystem, potentially leading to unauthorized file access or modification.

This could compromise system integrity, leak sensitive information, or allow malicious modification of files, depending on the privileges of the process performing the extraction.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability involves the extraction of symlinks with attacker-controlled targets outside the intended extraction directory by Archive::Tar versions before 3.08 for Perl.

To detect exploitation attempts or presence of this vulnerability on your system, you can check for symlinks created outside of expected extraction directories, especially those pointing to absolute paths or containing directory traversal sequences like "..".

Suggested commands to help detect suspicious symlinks include:

  • Find symlinks outside the extraction directory (replace /path/to/extract): find /path/to/extract -type l -exec ls -l {} +
  • Check symlink targets for absolute paths or directory traversal: find /path/to/extract -type l -exec readlink {} \; | grep -E '^/|\.\.'

Monitoring logs or audit trails for unexpected file creations or accesses outside extraction directories may also help detect exploitation.


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation is to update Archive::Tar to version 3.08 or later, where the vulnerability is fixed by validating symlink and hardlink targets in secure extract mode.

If immediate update is not possible, avoid extracting untrusted tar archives using vulnerable versions of Archive::Tar, especially those containing symlinks or hardlinks.

Additionally, consider running extraction processes with least privilege and in isolated environments to limit potential damage from directory traversal or unauthorized file access.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in Archive::Tar allows extraction of symlinks with attacker-controlled targets outside the intended extraction directory, potentially leading to unauthorized file access or directory traversal attacks.

Such unauthorized access or modification of files could result in exposure or alteration of sensitive data, which may violate data protection requirements under standards like GDPR or HIPAA.

Therefore, this vulnerability could negatively impact compliance with these regulations by undermining the confidentiality and integrity of protected data.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart