CVE-2025-45582
CVE-2025-45582 is a medium-severity vulnerability in Gnu Tar with a CVSS 3.x base score of 4.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-24.
Key facts
- Severity: Medium (CVSS 3.x base score 4.1)
- EPSS exploit prediction: 0% (35th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-21178
- Weakness: CWE-24
- Affected product: Gnu Tar
- Published:
- Last modified:
Description
GNU Tar through 1.35 allows file overwrite via directory traversal in crafted TAR archives, with a certain two-step process. First, the victim must extract an archive that contains a ../ symlink to a critical directory. Second, the victim must extract an archive that contains a critical file, specified via a relative pathname that begins with the symlink name and ends with that critical file's name. Here, the extraction follows the symlink and overwrites the critical file. This bypasses the protection mechanism of "Member name contains '..'" that would occur for a single TAR archive that attempted to specify the critical file via a ../ approach. For example, the first archive can contain "x -> ../../../../../home/victim/.ssh" and the second archive can contain x/authorized_keys. This can affect server applications that automatically extract any number of user-supplied TAR archives, and were relying on the blocking of traversal. This can also affect software installation processes in which "tar xf" is run more than once (e.g., when installing a package can automatically install two dependencies that are set up as untrusted tarballs instead of official packages). NOTE: the official GNU Tar manual has an otherwise-empty directory for each "tar xf" in its Security Rules of Thumb; however, third-party advice leads users to run "tar xf" more than once into the same directory.
Frequently asked questions
- What is CVE-2025-45582?
- GNU Tar through 1.35 allows file overwrite via directory traversal in crafted TAR archives, with a certain two-step process. First, the victim must extract an archive that contains a ../ symlink to a critical directory. Second, the victim must extract an archive that contains a critical file, specified via a relative pathname that begins with the symlink name and ends with that critical file's name. Here, the extraction follows the symlink and overwrites the critical file. This bypasses the protection mechanism of "Member name contains '..'" that would occur for a single TAR archive that attempted to specify the critical file via a ../ approach. For example, the first archive can contain "x -> ../../../../../home/victim/.ssh" and the second archive can contain x/authorized_keys. This can affect server applications that automatically extract any number of user-supplied TAR archives, and were relying on the blocking of traversal. This can also affect software installation processes in which "tar xf" is run more than once (e.g., when installing a package can automatically install two dependencies that are set up as untrusted tarballs instead of official packages). NOTE: the official GNU Tar manual has an otherwise-empty directory for each "tar xf" in its Security Rules of Thumb; however, third-party advice leads users to run "tar xf" more than once into the same directory.
- How severe is CVE-2025-45582?
- CVE-2025-45582 has a CVSS 3.x base score of 4.1, rated medium severity. It is exploitable over local access with high attack complexity, requires no privileges and user interaction. Impact on confidentiality is none, integrity low, and availability low.
- Is CVE-2025-45582 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (35th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-45582?
- CVE-2025-45582 affects Gnu Tar. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-45582?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2025-45582 have an EU (EUVD) identifier?
- Yes. CVE-2025-45582 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-21178.
- When was CVE-2025-45582 published?
- CVE-2025-45582 was published on 2025-07-11 and last updated on 2026-06-17.
References
- https://github.com/i900008/vulndb/blob/main/Gnu_tar_vuln.md
- https://lists.gnu.org/archive/html/bug-tar/2025-08/msg00012.html
- https://www.gnu.org/software/tar/
- https://www.gnu.org/software/tar/manual/html_node/Integrity.html
- https://www.gnu.org/software/tar/manual/html_node/Security-rules-of-thumb.html
- http://www.openwall.com/lists/oss-security/2025/11/01/6
Affected products (1)
- cpe:2.3:a:gnu:tar:*:*:*:*:*:*:*:*
More vulnerabilities in Gnu Tar
- CVE-2005-2541 — Critical (CVSS 10.0): Tar 1.15.1 does not properly warn the user when extracting setuid or setgid files, which may allow local users or…
- CVE-2019-9923 — High (CVSS 7.5): pax_decode_header in sparse.c in GNU Tar before 1.32 had a NULL pointer dereference when parsing certain archives that…
- CVE-2016-6321 — High (CVSS 7.5): Directory traversal vulnerability in the safer_name_suffix function in GNU tar 1.14 through 1.29 might allow remote…
- CVE-2007-4476 — High (CVSS 7.5): Buffer overflow in the safer_name_suffix function in GNU tar has unspecified attack vectors and impact, resulting in a…
- CVE-2010-0624 — Medium (CVSS 6.8): Heap-based buffer overflow in the rmt_read__ function in lib/rtapelib.c in the rmt client functionality in GNU tar…
- CVE-2007-4131 — Medium (CVSS 6.8): Directory traversal vulnerability in the contains_dot_dot function in src/names.c in GNU tar allows user-assisted…
Other CWE-24 vulnerabilities
- CVE-2026-39813 — Critical (CVSS 9.8): A path traversal: '../filedir' vulnerability in Fortinet FortiSandbox 5.0.0 through 5.0.5, FortiSandbox 4.4.0 through…
- CVE-2026-49103 — Critical (CVSS 9.4): Webmin before 2.640 does not safely construct a filename for saving of an attachment within the mailboxes component.…
- CVE-2025-61318 — Critical (CVSS 9.1): Emlog Pro 2.5.20 has an arbitrary file deletion vulnerability. This vulnerability stems from the admin/template.php…
- CVE-2023-6699 — Critical (CVSS 9.1): The WP Compress – Image Optimizer [All-In-One] plugin for WordPress is vulnerable to Directory Traversal in all…
- CVE-2025-54769 — High (CVSS 8.8): An authenticated, read-only user can upload a file and perform a directory traversal to have the uploaded file placed…
- CVE-2025-60344 — High (CVSS 8.6): A path traversal (directory traversal) vulnerability in D-Link DSR series routers allows unauthenticated remote…