CVE-2022-40923
Description
A vulnerability in the LIEF::MachO::SegmentCommand::virtual_address function of LIEF v0.12.1 allows attackers to cause a denial of service (DOS) through a segmentation fault via a crafted MachO file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A segmentation fault in LIEF v0.12.1's MachO parser via a crafted file enables denial of service.
Root
Cause
The vulnerability resides in the LIEF::MachO::SegmentCommand::virtual_address() function of the LIEF library, version 0.12.1. It is triggered when parsing a specially crafted Mach-O binary file, leading to a segmentation fault (SEGV) due to an invalid memory access (read at address 0x58) [1][3]. AddressSanitizer output confirms the crash occurs in SegmentCommand.cpp:137 during the parsing of dyld info binds in BinaryParser.tcc:1631 [3].
Attack
Vector
An attacker can cause a denial of service (DoS) by providing a malicious Mach-O file to any application that relies on LIEF to parse Mach-O files. No authentication or special privileges are required; the victim application simply needs to parse the crafted file, which can be delivered via email, web upload, or any other file exchange mechanism [3][4]. LIEF is commonly used as a library in security tools (e.g., disassemblers, binary instrumentation frameworks), making this a potential supply-chain risk.
Impact
Successful exploitation results in a segmentation fault, causing the application to crash. This constitutes a denial of service (DoS) condition, disrupting availability [4]. There is no evidence of code execution or memory corruption beyond the illustrated read access violation.
Mitigation
The issue has been patched in the LIEF repository commit 24935f654f6df700a9a062298258b9485f584502 [1]. Users should update to a version containing this fix. As LIEF is an open-source library, downstream projects must adopt the patched version to close the vulnerability [2].
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.12.1 | — |
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-rm2x-hgr8-w343ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-40923ghsaADVISORY
- github.com/lief-project/LIEF/commit/24935f654f6df700a9a062298258b9485f584502ghsaWEB
- github.com/lief-project/LIEF/issues/784ghsax_refsource_MISCWEB
- github.com/pypa/advisory-database/tree/main/vulns/lief/PYSEC-2022-43139.yamlghsaWEB
News mentions
0No linked articles in our index yet.