CVE-2026-41066: lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
Impact Using either of the two parsers in the default configuration (with resolveentities=True) allows untrusted XML input to read local files.
Patches lxml 6.1.0 changes the default to resolveentities='internal', thus disallowing local file access by default.
Workarounds Setting the resolveentities option explicitly to resolveentities='internal' or resolveentities=False disables the local file access.
Resources Original report: https://bugs.launchpad.net/lxml/+bug/2146291
The default option was changed to resolveentities='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.
Other sources
lxml is a library for processing XML and HTML in the Python language. Prior to 6.1.0, using either of the two parsers in the default configuration (with resolveentities=True) allows untrusted XML input to read local files. Setting the resolveentities option explicitly to resolveentities='internal' or resolveentities=False disables the local file access. This vulnerability is fixed in 6.1.0.
— MITRE
lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
— Microsoft
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-41066?
CVE-2026-41066 is rated as high severity due to its potential for unauthorized local file access.
How do I fix CVE-2026-41066?
To fix CVE-2026-41066, upgrade to lxml version 6.1.0 or higher.
What vulnerability does CVE-2026-41066 address?
CVE-2026-41066 addresses the vulnerability that allows untrusted XML input to read local files using the default parser configuration.
What is the risk of not addressing CVE-2026-41066?
Not addressing CVE-2026-41066 can lead to unauthorized access to sensitive local files in your application.
Which software is affected by CVE-2026-41066?
CVE-2026-41066 affects the lxml package when configured with resolve_entities set to true.