CVE-2024-25711: Diffoscope Path Traversal Vulnerability
MODERATECVE-2024-25711 is a MODERATE path traversal vulnerability (General Security Weakness) affecting Diffoscope libraries in the PyPI ecosystem. The issue involves diffoscope path traversal vulnerability. Remediation is available by upgrading affected packages to version 256.
CVE-2024-25711 at a Glance
How to Fix CVE-2024-25711
To remediate this vulnerability, upgrade all affected Diffoscope 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 diffoscope>=256
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show diffoscope
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-25711, inspect your installed packages using pip:
pip show diffoscope
Analyze the terminal output to locate any version of Diffoscope in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 256), your application is affected.
Note: The pip show diffoscope command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Diffoscope, 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-2024-25711 Affected Diffoscope Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
diffoscope
|
PyPI |
< 256
|
256
|
References
Frequently Asked Questions
What is CVE-2024-25711?
Which Diffoscope versions are affected?
What version fixes CVE-2024-25711?
Is diffoscope affected?
What CWE is associated with CVE-2024-25711?
How can I check PyPI dependencies for CVE-2024-25711?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-33w6-hvmq-gh4x",
"modified" : "2024-02-27T21:48:54Z",
"published" : "2024-02-27T03:31:03Z",
"aliases" : [ "CVE-2024-25711" ],
"summary" : "diffoscope Path Traversal vulnerability",
"details" : "diffoscope before 256 allows directory traversal via an embedded filename in a GPG file. Contents of any file, such as ../.ssh/id_rsa, may be disclosed to an attacker. This occurs because the value of the gpg --use-embedded-filenames option is trusted.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "diffoscope"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "256"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25711"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/diffoscope/PYSEC-2024-41.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OUNBANAWD6TZH2NRRV4YUIAXEHLUJQ47"
}, {
"type" : "WEB",
"url" : "https://salsa.debian.org/reproducible-builds/diffoscope"
}, {
"type" : "WEB",
"url" : "https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/dfed769904c27d66a14a5903823d9c8c5aae860e"
}, {
"type" : "WEB",
"url" : "https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/361"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-27T21:48:54Z",
"nvd_published_at" : "2024-02-27T02:15:06Z"
}
}