Vulnerabilities in pkg:pypi/bsdiff4
PACKAGECVE-2020-15904 is a HIGH (CVSS 7.8) bsdiff4 out-of-bounds write vulnerability (CWE-787: Out-of-bounds Write) affecting Bsdiff4 libraries in the PyPI ecosystem. The issue involves bsdiff4 out-of-bounds write via patch file. Remediation is available by upgrading affected packages to version 1.2.0.
pkg:pypi/bsdiff4
Vulnerability advisories affecting package pkg:pypi/bsdiff4. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-f8m3-jpxr-hm5x | CVE-2020-15904 | HIGH | bsdiff4 out-of-bounds write via patch file |
CVE-2020-15904 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-15904
To remediate this vulnerability, upgrade all affected Bsdiff4 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 bsdiff4>=1.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show bsdiff4
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-15904, inspect your installed packages using pip:
pip show bsdiff4
Analyze the terminal output to locate any version of Bsdiff4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.
Note: The pip show bsdiff4 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Bsdiff4, 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-2020-15904 Affected Bsdiff4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
bsdiff4
|
PyPI |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is CVE-2020-15904?
Which Bsdiff4 versions are affected?
What version fixes CVE-2020-15904?
Is bsdiff4 affected?
What is the CVSS score of CVE-2020-15904?
What CWE is associated with CVE-2020-15904?
How can I check PyPI dependencies for CVE-2020-15904?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f8m3-jpxr-hm5x",
"modified" : "2024-09-06T15:56:54Z",
"published" : "2022-05-24T17:24:16Z",
"aliases" : [ "CVE-2020-15904" ],
"summary" : "bsdiff4 out-of-bounds write via patch file",
"details" : "A buffer overflow in the patching routine of bsdiff4 before 1.2.0 allows an attacker to write to heap memory (beyond allocated bounds) via a crafted patch file.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "bsdiff4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15904"
}, {
"type" : "WEB",
"url" : "https://github.com/ilanschnell/bsdiff4/commit/49a4cee2feef7deaf9d89e5e793a8824930284d7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ilanschnell/bsdiff4"
}, {
"type" : "WEB",
"url" : "https://github.com/ilanschnell/bsdiff4/blob/9a84c2ee01f5ba0742d18c9f3b3d5244ae7fb302/CHANGELOG.txt#L30-L31"
}, {
"type" : "WEB",
"url" : "https://github.com/ilanschnell/bsdiff4/blob/master/CHANGELOG.txt"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/bsdiff4/PYSEC-2020-30.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-23T20:37:09Z",
"nvd_published_at" : "2020-07-22T23:15:00Z"
}
}