CVE-2026-41066High· 7.5▾ Twilightlxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Sep 12.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.3%
Using either of the two parsers in the default configuration (with resolve_entities=True) allows untrusted XML input to read local files.
lxml 6.1.0 changes the default to resolve_entities='internal', thus disallowing local file access by default.
Setting the resolve_entities option explicitly to resolve_entities='internal' or resolve_entities=False disables the local file access.
Original report: https://bugs.launchpad.net/lxml/+bug/2146291
The default option was changed to resolve_entities='internal' for the normal XML and HTML parsers in lxml 5.0. The default was not changed for iterparse() and ETCompatXMLParser() at the time. lxml 6.1 makes the safe option the default for all parsers.
lxml < 6.1.0Upgrade to a patched release:
lxml 6.1.0Connected by shared product, vendor, weakness, or advisory.