VYPR
High severityNVD Advisory· Published Oct 3, 2022· Updated Aug 3, 2024

CVE-2022-40922

CVE-2022-40922

Description

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A crafted Mach-O file causes a segmentation fault in LIEF's MachO::BinaryParser::init_and_parse function, enabling denial of service.

Vulnerability

Description CVE-2022-40922 is a denial-of-service (DoS) vulnerability in LIEF v0.12.1, a library for parsing and manipulating executable formats. The flaw resides in the LIEF::MachO::BinaryParser::init_and_parse function, triggered when processing a specially crafted Mach-O binary. The root cause is improper validation of Mach-O structures, leading to a write to an invalid memory address (the zero page) as indicated by AddressSanitizer output [2].

Attack

Vector and Exploitation An attacker can exploit this vulnerability by providing a malicious Mach-O file to a LIEF-based application that parses Mach-O binaries. The issue requires no authentication or special privileges; the victim only needs to invoke LIEF::MachO::Parser::parse() on the crafted file [2]. The segmentation fault occurs during parsing when access to corrupted or malformed load commands and string indices causes a null-pointer dereference [2].

Impact

The vulnerability results in a crash (segmentation fault), leading to a denial of service for the consuming application. LIEF is used in security tools, binary analysis, and reverse engineering pipelines, so a successful DoS can interrupt automated processing of untrusted files [1].

Mitigation

Status The issue was reported via the LIEF issue tracker in 2022 [2]. LIEF maintainers have addressed the bug in subsequent releases—users should upgrade to a patched version (e.g., 0.13.0 or later). Users unable to upgrade should exercise caution when parsing Mach-O files from untrusted sources and consider using a sandboxed environment.

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.

PackageAffected versionsPatched versions
liefPyPI
< 0.12.20.12.2

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

6

News mentions

0

No linked articles in our index yet.