CVE-2026-41066 lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files

High 7.5 Published Updated

Attackers can read local files via XML External Entity injection when using lxml parsers with default settings.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-41066?

CVE-2026-41066 is a high-severity vulnerability in lxml, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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 resolve_entities=True) allows untrusted XML input to read local files. Setting the resolve_entities option explicitly to resolve_entities='internal' or resolve_entities=False disables the local file access. This vulnerability is fixed in 6.1.0.

Weakness: CWE-611

Which versions are affected by CVE-2026-41066?

3 open source packages ship an affected version, including lxml. It affects 1 product.

PackageAffectedFixed in
lxml PyPIAll versions6.1.0
lxml PyPIAll versions6.1.0
lxml PyPIAll versions6.1.0
Linux distribution packages (8)
python-lxml SUSE:Linux Enterprise Micro 5.3All versions4.7.1-150200.3.15.1
python-lxml SUSE:Linux Enterprise Micro 5.4All versions4.7.1-150200.3.15.1
python3-lxml SUSE:Linux Enterprise Micro 5.5All versions4.9.1-150500.3.7.1
python3-lxml SUSE:Linux Enterprise Module for Basesystem 15 SP7All versions4.9.1-150500.3.7.1
python-lxml SUSE:Linux Enterprise Module for Python 3 15 SP7All versions4.9.3-150400.8.11.1
python-lxml SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions3.6.1-8.8.1
python3-lxml SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions3.6.1-3.9.1
python-lxml openSUSE:TumbleweedAll versions6.1.0-1.1

Products include Lxml Lxml.

How do I fix CVE-2026-41066?

Upgrade lxml to 6.1.0 or later.

Is CVE-2026-41066 being exploited?

There is no known exploitation of CVE-2026-41066 in the wild and no public exploit code.

Sources

Also known as ALPINE-CVE-2026-41066, AZL-84038, BELL-CVE-2026-41066, CLEANSTART-2026-CH74669, CLEANSTART-2026-EH50321, CLSA-2026-1779151640 and 31 more.

Is CVE-2026-41066 in your software?

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

Check your SBOMs for free