CVE-2022-40922: Lief Denial of Service Vulnerability
HIGHCVE-2022-40922 is a HIGH (CVSS 6.5) denial of service vulnerability (General Security Weakness) affecting Lief libraries in the PyPI ecosystem. The issue involves lief vulnerable to denial of service through segmentation fault. Remediation is available by upgrading affected packages to version 0.12.2.
CVE-2022-40922 at a Glance
Security Impact
CVSS: 6.5
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:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2022-40922
To remediate this vulnerability, upgrade all affected Lief 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 lief>=0.12.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show lief
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-40922, inspect your installed packages using pip:
pip show lief
Analyze the terminal output to locate any version of Lief in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.2), your application is affected.
Note: The pip show lief 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 Lief, 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-40922 Affected Lief Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lief
|
PyPI |
< 0.12.2
|
0.12.2
|
References
Frequently Asked Questions
What is CVE-2022-40922?
Which Lief versions are affected?
What version fixes CVE-2022-40922?
Is lief affected?
What is the CVSS score of CVE-2022-40922?
What CWE is associated with CVE-2022-40922?
How can I check PyPI dependencies for CVE-2022-40922?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-38hf-c37x-32hv",
"modified" : "2024-11-26T18:47:28Z",
"published" : "2022-10-04T00:00:25Z",
"aliases" : [ "CVE-2022-40922" ],
"summary" : "LIEF vulnerable to denial of service through segmentation fault",
"details" : "A vulnerability in the LIEF::MachO::BinaryParser::init_and_parse function of LIEF v0.12.1 allows attackers to cause a denial of service (DOS) through a segmentation fault via a crafted MachO file. A [patch](https://github.com/lief-project/LIEF/commit/fde2c48986739fabd2cf9b40b9af149a89c57850) for this issue is available at commit fde2c48986739fabd2cf9b40b9af149a89c57850.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "lief"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.12.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-40922"
}, {
"type" : "WEB",
"url" : "https://github.com/lief-project/LIEF/issues/781"
}, {
"type" : "WEB",
"url" : "https://github.com/lief-project/LIEF/commit/ad811916670e83947560b6f3c45df6e71d3885af"
}, {
"type" : "WEB",
"url" : "https://github.com/lief-project/LIEF/commit/fde2c48986739fabd2cf9b40b9af149a89c57850"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lief-project/LIEF"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2022-43138.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-06T20:00:30Z",
"nvd_published_at" : "2022-10-03T13:15:00Z"
}
}