CVE-2025-58438 internetarchive is vulnerable to Directory Traversal through file downloads

Critical 9.4 Published Updated

Attackers can exploit unsanitized filenames in the internetarchive library to write files outside intended directories, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-58438?

CVE-2025-58438 is a critical path traversal vulnerability in jjjake internetarchive, published on 6 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

internetarchive is a Python and Command-Line Interface to Archive.org In versions 5.5.0 and below, there is a directory traversal (path traversal) vulnerability in the File.download() method of the internetarchive library. The file.download() method does not properly sanitize user-supplied filenames or validate the final download path. A maliciously crafted filename could contain path traversal sequences (e.g., ../../../../windows/system32/file.txt) or illegal characters that, when processed, would cause the file to be written outside of the intended target directory. An attacker could potentially overwrite critical system files or application configuration files, leading to a denial of service, privilege escalation, or remote code execution, depending on the context in which the library is used. The vulnerability is particularly critical for users on Windows systems, but all operating systems are affected. This issue is fixed in version 5.5.1.

Weakness: CWE-22

Which versions are affected by CVE-2025-58438?

3 open source packages ship an affected version, including internetarchive.

PackageAffectedFixed in
internetarchive PyPIAll versions5.5.1
internetarchive PyPIAll versions5.5.1
internetarchive PyPIAll versions5.5.1

How do I fix CVE-2025-58438?

Upgrade internetarchive to 5.5.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-58438 being exploited?

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

Sources

Also known as DEBIAN-CVE-2025-58438, DLA-4314-1, DSA-6035-1, GHSA-wx3r-v6h7-frjp, PYSEC-2026-357, UBUNTU-CVE-2025-58438 and 1 more.

Is CVE-2025-58438 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free