GHSA-wx3r-v6h7-frjp

Suggest an improvement
Source
https://github.com/advisories/GHSA-wx3r-v6h7-frjp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-wx3r-v6h7-frjp/GHSA-wx3r-v6h7-frjp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-wx3r-v6h7-frjp
Aliases
Published
2025-09-05T21:00:42Z
Modified
2025-11-03T21:57:35.143433Z
Severity
  • 9.4 (Critical) CVSS_V4 - 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 CVSS Calculator
Summary
internetarchive Vulnerable to Directory Traversal in File.download()
Details

Impact

What kind of vulnerability is it? This is a Critical severity directory traversal (path traversal) vulnerability in the File.download() method of the internetarchive library.

Who is impacted? All 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.

Description of the vulnerability: The 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.

Potential Impact: 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.

Patches

Has the problem been patched? Yes, the problem has been patched.

What versions should users upgrade to? Users must upgrade to version 5.5.1 or later.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading? There is no direct workaround that does not involve upgrading the library. The vulnerability is in the core logic of the file download process.

The only alternative for users who absolutely cannot upgrade is to implement their own custom download function that:

  1. Manually sanitizes all filenames using a robust method.
  2. Validates that the resolved absolute path of the download target is within the intended directory before writing any files.

However, this essentially re-implements the fix and is not recommended. Upgrading to the patched version is the only safe and supported solution.

References

Database specific
{
    "nvd_published_at": "2025-09-06T19:15:38Z",
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2025-09-05T21:00:42Z",
    "cwe_ids": [
        "CWE-22"
    ]
}
References

Affected packages

PyPI / internetarchive

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.5.1

Affected versions

0.*
0.2.5
0.2.6
0.2.7
0.2.8
0.2.9
0.3.0
0.3.1
0.3.2
0.3.3
0.3.4
0.3.6
0.3.7
0.3.8
0.3.9
0.4.0
0.4.1
0.4.2
0.4.3
0.4.4
0.4.5
0.4.6
0.4.7
0.4.8
0.4.9
0.5.0
0.5.1
0.5.2
0.5.4
0.5.5
0.5.7
0.5.9
0.6.0
0.6.1
0.6.2
0.6.3
0.6.5
0.6.6
0.6.8
0.6.9
0.7.0
0.7.1
0.7.2
0.7.3
0.7.4
0.7.5
0.7.6
0.7.7
0.7.8
0.7.9
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.8.5
0.8.9
0.9.0
0.9.1
0.9.2
0.9.3
0.9.5
0.9.6
0.9.7
0.9.8
1.*
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9
1.0.10
1.1.0
1.2.0
1.3.0
1.4.0
1.5.0
1.6.0
1.7.0
1.7.1
1.7.2
1.7.3
1.7.4
1.7.5
1.7.6
1.7.7
1.8.0
1.8.1
1.8.2
1.8.3
1.8.4
1.8.5
1.9.0
1.9.2
1.9.3
1.9.4
1.9.5
1.9.6
1.9.9
2.*
2.0.0
2.0.2
2.0.3
2.1.0
2.2.0
2.3.0
3.*
3.0.0
3.0.1
3.0.2
3.1.0
3.2.0
3.3.0
3.4.0
3.5.0
3.6.0
3.7.0
4.*
4.0.1
4.1.0
5.*
5.0.0
5.0.1
5.0.2
5.0.3.dev1
5.0.3
5.0.4
5.0.5
5.1.0
5.2.0
5.2.1
5.3.0
5.3.1
5.4.0
5.4.1
5.5.0

Database specific

last_known_affected_version_range
"<= 5.5.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-wx3r-v6h7-frjp/GHSA-wx3r-v6h7-frjp.json"