Vulnerabilities in pkg:pypi/patchelf
PACKAGECVE-2022-44940 is a HIGH (CVSS 9.1) patchelf out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Patchelf libraries in the PyPI ecosystem. The issue involves patchelf out-of-bounds read. Remediation is available by upgrading affected packages to version 0.16.1.0.
pkg:pypi/patchelf
Vulnerability advisories affecting package pkg:pypi/patchelf. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-5pcj-3m26-w633 | CVE-2022-44940 | HIGH | Patchelf out-of-bounds read |
CVE-2022-44940 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2022-44940
To remediate this vulnerability, upgrade all affected Patchelf 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 patchelf>=0.16.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show patchelf
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-44940, inspect your installed packages using pip:
pip show patchelf
Analyze the terminal output to locate any version of Patchelf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.1.0), your application is affected.
Note: The pip show patchelf command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Patchelf, 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-2022-44940 Affected Patchelf Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
patchelf
|
PyPI |
< 0.16.1.0
|
0.16.1.0
|
References
Frequently Asked Questions
What is CVE-2022-44940?
Which Patchelf versions are affected?
What version fixes CVE-2022-44940?
Is patchelf affected?
What is the CVSS score of CVE-2022-44940?
What CWE is associated with CVE-2022-44940?
How can I check PyPI dependencies for CVE-2022-44940?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5pcj-3m26-w633",
"modified" : "2025-04-17T16:45:14Z",
"published" : "2022-12-20T00:30:29Z",
"aliases" : [ "CVE-2022-44940" ],
"summary" : "Patchelf out-of-bounds read",
"details" : "Patchelf v0.9 was discovered to contain an out-of-bounds read via the function modifyRPath at src/patchelf.cc.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "patchelf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.16.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-44940"
}, {
"type" : "WEB",
"url" : "https://github.com/NixOS/patchelf/pull/419"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/patchelf/PYSEC-2022-43144.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pypatchelf/PYSEC-2022-43151.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-22T20:26:19Z",
"nvd_published_at" : "2022-12-19T22:15:00Z"
}
}