Vulnerabilities in pkg:pypi/internetarchive
PACKAGECVE-2025-58438 is a CRITICAL path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Internetarchive libraries in the PyPI ecosystem. The issue involves internetarchive vulnerable to directory traversal in file.download(). Remediation is available by upgrading affected packages to version 5.5.1.
pkg:pypi/internetarchive
Vulnerability advisories affecting package pkg:pypi/internetarchive. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-wx3r-v6h7-frjp | CVE-2025-58438 | CRITICAL | internetarchive Vulnerable to Directory Traversal in File.download() |
CVE-2025-58438 at a Glance
How to Fix CVE-2025-58438
To remediate this vulnerability, upgrade all affected Internetarchive dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install internetarchive>=5.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show internetarchive
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-58438, inspect your installed packages using pip:
pip show internetarchive
Analyze the terminal output to locate any version of Internetarchive in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.1), your application is affected.
Note: The pip show internetarchive command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Internetarchive, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-58438 Affected Internetarchive Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
internetarchive
|
PyPI |
< 5.5.1
|
5.5.1
|
References
Frequently Asked Questions
What is CVE-2025-58438?
Which Internetarchive versions are affected?
What version fixes CVE-2025-58438?
Is internetarchive affected?
What CWE is associated with CVE-2025-58438?
How can I check PyPI dependencies for CVE-2025-58438?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wx3r-v6h7-frjp",
"modified" : "2025-11-03T21:34:26Z",
"published" : "2025-09-05T21:00:42Z",
"aliases" : [ "CVE-2025-58438" ],
"summary" : "internetarchive Vulnerable to Directory Traversal in File.download()",
"details" : "### Impact\n**What kind of vulnerability is it?**\nThis is a **Critical** severity directory traversal (path traversal) vulnerability in the `File.download()` method of the `internetarchive` library.\n\n**Who is impacted?**\nAll users of the `internetarchive` library versions `< 5.5.1` are impacted. The vulnerability is particularly critical for users on **Windows systems**, but all operating systems are affected.\n\n**Description of the vulnerability:**\nThe vulnerability existed because the `file.download()` method did 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.\n\n**Potential Impact:**\nAn 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.\n\n### Patches\n**Has the problem been patched?**\nYes, the problem has been patched.\n\n**What versions should users upgrade to?**\nUsers must upgrade to version **5.5.1** or later.\n\n### Workarounds\nIs there a way for users to fix or remediate the vulnerability without upgrading?\nThere is no direct workaround that does not involve upgrading the library. The vulnerability is in the core logic of the file download process.\n\nThe only alternative for users who absolutely cannot upgrade is to implement their own custom download function that:\n\n1. Manually sanitizes all filenames using a robust method.\n2. Validates that the resolved absolute path of the download target is within the intended directory before writing any files.\n\nHowever, this essentially re-implements the fix and is not recommended. Upgrading to the patched version is the only safe and supported solution.\n\n### References\n\n- [Release Notes for v5.5.1](https://github.com/jjjake/internetarchive/releases/tag/v5.5.1)\n- [Commit with the fix](https://github.com/jjjake/internetarchive/commit/cba2d459e10a9489fb35caeba0b03e80f5f5d7c2)\n- **CVE Identifier:** CVE-2025-58438",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "internetarchive"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.5.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.5.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jjjake/internetarchive/security/advisories/GHSA-wx3r-v6h7-frjp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58438"
}, {
"type" : "WEB",
"url" : "https://github.com/jjjake/internetarchive/commit/cba2d459e10a9489fb35caeba0b03e80f5f5d7c2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jjjake/internetarchive"
}, {
"type" : "WEB",
"url" : "https://github.com/jjjake/internetarchive/releases/tag/v5.5.1"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00030.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-05T21:00:42Z",
"nvd_published_at" : "2025-09-06T19:15:38Z"
}
}