Double free in Lxml - #VU170753
Published: November 27, 2026
Vulnerability details
The vulnerability allows a remote attacker to corrupt parser memory and cause a denial of service.
The vulnerability exists due to improper memory ownership in lxml's XMLPullParser and iterparse event handling when releasing a processing instruction or comment event prematurely frees the document's external DTD subset. A remote attacker can supply crafted XML to an application configured to load external DTDs and collect these events to trigger a double free during document cleanup, a use-after-free read during DTD inspection, or a crash during validation.