CVE-2026-56412 Use after free in libexpat
A use-after-free vulnerability in libexpat allows attackers to execute arbitrary code or cause denial of service via crafted XML input.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-56412?
CVE-2026-56412 is a medium-severity use after free vulnerability in Libexpat Project Libexpat, published on 21 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
libexpat before 2.8.2 does not consider XML_TOK_DATA_CHARS in doCdataSection and thus lacks handler call depth tracking for various calls from within handlers in cases of a policy violation. Thus, a use-after-free can occur. NOTE: this issue exists because of an incomplete fix for CVE-2026-50219.
Weakness: CWE-416
Which versions are affected by CVE-2026-56412?
It affects 1 product.
Products include Libexpat Project Libexpat.
How do I fix CVE-2026-56412?
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-2026-56412 being exploited?
There is no known exploitation of CVE-2026-56412 in the wild and no public exploit code.
Other vulnerabilities in Libexpat Project Libexpat
Sources
Also known as ALPINE-CVE-2026-56412, AZL-90255, BELL-CVE-2026-56412, DEBIAN-CVE-2026-56412, ECHO-9d3b-357f-1f8c, GHSA-m2mm-5w64-p8p7 and 3 more.