CVE-2022-38306: Lief LIEF Vulnerable To Heap Based Vulnerability
MODERATECVE-2022-38306 is a MODERATE (CVSS 5.5) lief vulnerable to heap based vulnerability (CWE-787: Out-of-bounds Write) affecting Lief libraries in the PyPI ecosystem. The issue involves lief vulnerable to heap based buffer overflow. Remediation is available in the latest vendor maintenance releases.
CVE-2022-38306 at a Glance
Security Impact
CVSS: 5.5
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:N/I:N/A:H).
How to Fix CVE-2022-38306
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>=Latest secure release
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-38306, 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 the patched release), 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 CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. 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-38306 Affected Lief Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lief
|
PyPI |
≤ 0.12.1
|
|
References
Frequently Asked Questions
What is CVE-2022-38306?
Which Lief versions are affected?
What version fixes CVE-2022-38306?
Is lief affected?
What is the CVSS score of CVE-2022-38306?
What CWE is associated with CVE-2022-38306?
How can I check PyPI dependencies for CVE-2022-38306?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-52xx-r3g2-p8jm",
"modified" : "2022-09-20T22:07:20Z",
"published" : "2022-09-14T00:00:42Z",
"aliases" : [ "CVE-2022-38306" ],
"summary" : "LIEF vulnerable to heap based buffer overflow",
"details" : "LIEF commit 5d1d643 was discovered to contain a heap-buffer overflow in the component `/core/CorePrPsInfo.tcc`. Commit 53bf680ef494a835e2c4a5de328ca85416a03a5a contains a patch.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "lief"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.12.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-38306"
}, {
"type" : "WEB",
"url" : "https://github.com/lief-project/LIEF/issues/763"
}, {
"type" : "WEB",
"url" : "https://github.com/lief-project/LIEF/commit/53bf680ef494a835e2c4a5de328ca85416a03a5a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lief-project/LIEF"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2022-274.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-20T22:05:46Z",
"nvd_published_at" : "2022-09-13T21:15:00Z"
}
}