CVE-2022-40304 Use after free in n/a

High 7.8 Published Updated

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.

All Apple Ipados vulnerabilities

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.

Is CVE-2022-40304 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free