# CVE-2025-13462: tarfile: Skip DIRTYPE normalization during GNU LONGNAME/LONGLINK handling

> A crafted tar archive can bypass path normalization in Python's tarfile module, potentially allowing directory traversal or file extraction outside the intended directory.

- **Severity:** Low 2.0 (`CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Mar 2026
- **Updated:** 13 Aug 2026
- **Also known as:** AZL-109686, AZL-80493, BELL-CVE-2025-13462, CLSA-2026-1781082390, CLSA-2026-1781082676, CLSA-2026-1781083045, CLSA-2026-1781083526, CLSA-2026-1781083779, CLSA-2026-1781086040, CLSA-2026-1781104507, CLSA-2026-1781107808, DEBIAN-CVE-2025-13462, ECHO-2833-b900-ac3d, GHSA-9qpv-486p-2v4h, MINI-6fhg-294p-4g63, MINI-fg6w-7xm9-6r66, MINI-mvj7-r888-j7qw, MINI-qr53-gv9q-3gpj, MINI-wp9x-wghq-56jp, PSF-2026-10, UBUNTU-CVE-2025-13462

## What is CVE-2025-13462?

CVE-2025-13462 is a low-severity path traversal vulnerability in Python Python, published on 12 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

The "tarfile" module would still apply normalization of AREGTYPE (\x00) blocks to DIRTYPE, even while processing a multi-block member such as GNUTYPE_LONGNAME or GNUTYPE_LONGLINK. This could result in a crafted tar archive being misinterpreted by the tarfile module compared to other implementations.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), CWE-434 (Unrestricted Upload of File with Dangerous Type), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2025-13462?

It affects 1 product.


Products: Python Python.

## How do I fix CVE-2025-13462?

Apply the vendor's patch.

## Is CVE-2025-13462 being exploited?

There is no known exploitation of CVE-2025-13462 in the wild and no public exploit code.

## Other vulnerabilities in Python Python

- [CVE-2008-5031](https://insights.sbomify.com/CVE-2008-5031/): Integer overflow in n/a (critical 10.0)
- [CVE-2014-4650](https://insights.sbomify.com/CVE-2014-4650/): Path traversal in n/a (critical 9.8)
- [CVE-2016-5636](https://insights.sbomify.com/CVE-2016-5636/): Integer overflow in n/a (critical 9.8)
- [CVE-2007-4559](https://insights.sbomify.com/CVE-2007-4559/): Path traversal in n/a (critical 9.8)
- [CVE-2017-17522](https://insights.sbomify.com/CVE-2017-17522/): Command injection in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-13462 and fix it if it is affected.

What it is: CVE-2025-13462 is a low-severity path traversal vulnerability in Python Python, published on 12 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-13462 in the wild and no public exploit code.

Affected product: Python Python. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-13462/ (Markdown: https://insights.sbomify.com/CVE-2025-13462/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-13462
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-13462
- OSV: https://osv.dev/vulnerability/CVE-2025-13462

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-13462/
Summaries are generated and may contain mistakes; the official description above is the record.
