CVE-2021-32297
Description
An issue was discovered in LIEF through 0.11.4. A heap-buffer-overflow exists in the function main located in pe_reader.c. It allows an attacker to cause code Execution.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Heap-buffer-overflow in LIEF's pe_reader.c allows attackers to execute arbitrary code via a crafted PE file in versions through 0.11.4.
Vulnerability
A heap-buffer-overflow exists in the main function of pe_reader.c in LIEF through version 0.11.4 [2]. The vulnerability occurs when processing specially crafted PE files, leading to a read of size 1 beyond an allocated buffer [3].
Exploitation
An attacker can trigger this vulnerability by providing a malicious PE file to the pe_reader example tool. No authentication or special privileges are required; the attack is conducted locally or via a service that processes untrusted PE files. The overflow is detected by AddressSanitizer as a heap-buffer-overflow [3].
Impact
Successful exploitation allows the attacker to achieve arbitrary code execution, as indicated by the CVE description [2]. The overflow can corrupt adjacent memory, potentially leading to control of the process.
Mitigation
The issue is fixed in LIEF version 0.11.5 and later [1]. Users should upgrade to the latest stable release (0.17.6) [1]. For versions before 0.11.5, avoid processing untrusted PE files with the pe_reader tool as a workaround.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
liefPyPI | < 0.11.0 | 0.11.0 |
Affected products
2- LIEF/LIEFdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-22x7-vwh9-5w4gghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-32297ghsaADVISORY
- github.com/lief-project/LIEF/commit/19e06755e8ce1ecf136360a5c36cded3701ac253ghsaWEB
- github.com/lief-project/LIEF/issues/449ghsax_refsource_MISCWEB
- github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2021-324.yamlghsaWEB
News mentions
0No linked articles in our index yet.