CVE-2022-40304 Use after free in n/a
A double-free vulnerability in libxml2 allows attackers to cause denial of service or potentially execute arbitrary code via crafted XML entity definitions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-40304?
CVE-2022-40304 is a high-severity use after free vulnerability in Apple Ipados, published on 23 Nov 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
An issue was discovered in libxml2 before 2.10.3. Certain invalid XML entity definitions can corrupt a hash table key, potentially leading to subsequent logic errors. In one case, a double-free can be provoked.
Weakness: CWE-415
Which versions are affected by CVE-2022-40304?
It affects 17 products.
Products include Apple Ipados, Apple Iphone Os, Apple Macos, Apple Tvos, Apple Watchos, Netapp Active Iq Unified Manager and 11 more.
How do I fix CVE-2022-40304?
Upgrade to a fixed version.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2022-40304 being exploited?
There is no known exploitation of CVE-2022-40304 in the wild and no public exploit code.
Other vulnerabilities in Apple Ipados
- CVE-2025-43300 Apple iOS, iPadOS, and macOS Out-of-Bounds Write
- CVE-2025-24201 Apple Multiple Products WebKit Out-of-Bounds Write
- CVE-2025-24085 Apple Multiple Products Use-After-Free
- CVE-2025-31200 Apple Multiple Products Memory Corruption
- CVE-2025-31201 Apple Multiple Products Arbitrary Read and Write
Sources
Also known as ALPINE-CVE-2022-40304, AZL-11500, DEBIAN-CVE-2022-40304, ECHO-1e82-a71f-bf08, GHSA-g848-pppp-vg6f, JLSEC-2025-78 and 1 more.