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

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

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Apr 2026
- **Updated:** 24 Apr 2026
- **Also known as:** ALPINE-CVE-2026-41066, AZL-84038, BELL-CVE-2026-41066, CLEANSTART-2026-CH74669, CLEANSTART-2026-EH50321, CLSA-2026-1779151640, CLSA-2026-1779238041, CLSA-2026-1791195897, DEBIAN-CVE-2026-41066, ECHO-e83f-9e30-4171, GHSA-vfmq-68hx-4jfw, MINI-3wph-h6r9-hg7h, MINI-52x3-2745-68v2, MINI-66x7-xfrp-v35r, MINI-6pm3-5459-g446, MINI-9w24-g92g-2wf7, MINI-cmf6-7x29-6j4h, MINI-m6qw-86xc-qgp7, MINI-vwh3-w5xp-h793, OESA-2026-2008, OESA-2026-2009, OESA-2026-2010, OESA-2026-2011, OESA-2026-2012, PYSEC-2026-87, ROOT-APP-PYPI-CVE-2026-41066, SUSE-SU-2026:21587-1, SUSE-SU-2026:21603-1, SUSE-SU-2026:21731-1, SUSE-SU-2026:2488-1, SUSE-SU-2026:2728-1, SUSE-SU-2026:2729-1, SUSE-SU-2026:2752-1, SUSE-SU-2026:2754-1, UBUNTU-CVE-2026-41066, openSUSE-SU-2026:10596-1, openSUSE-SU-2026:20737-1

## 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 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2026-41066?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `lxml` | PyPI | All versions | 6.1.0 |
| `lxml` | PyPI | All versions | 6.1.0 |
| `lxml` | PyPI | All versions | 6.1.0 |
| `python-lxml` | SUSE:Linux Enterprise Micro 5.3 | All versions | 4.7.1-150200.3.15.1 |
| `python-lxml` | SUSE:Linux Enterprise Micro 5.4 | All versions | 4.7.1-150200.3.15.1 |
| `python3-lxml` | SUSE:Linux Enterprise Micro 5.5 | All versions | 4.9.1-150500.3.7.1 |
| `python3-lxml` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 4.9.1-150500.3.7.1 |
| `python-lxml` | SUSE:Linux Enterprise Module for Python 3 15 SP7 | All versions | 4.9.3-150400.8.11.1 |
| `python-lxml` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 3.6.1-8.8.1 |
| `python3-lxml` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 3.6.1-3.9.1 |
| `python-lxml` | openSUSE:Tumbleweed | All versions | 6.1.0-1.1 |

Products: 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.

## Other vulnerabilities in lxml

- [CVE-2014-3146](https://insights.sbomify.com/CVE-2014-3146/): lxml Cross-site Scripting Via Control Characters (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41066 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-41066 in the wild and no public exploit code.

Affected packages and fixed versions:
- lxml (PyPI): affected all versions; fixed in 6.1.0
- lxml (PyPI): affected all versions; fixed in 6.1.0
- lxml (PyPI): affected all versions; fixed in 6.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41066/ (Markdown: https://insights.sbomify.com/CVE-2026-41066/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41066
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41066
- OSV: https://osv.dev/vulnerability/CVE-2026-41066

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41066/
Summaries are generated and may contain mistakes; the official description above is the record.
