7.5high
lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.33% (higher than 27% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vfmq-68hx-4jfwPYSEC-2026-87
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| lxml lxml | < 6.1.0, before 6.1.0 | CVE List, NVD |
| lxml (PyPI) | before 6.1.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
Using either of the two parsers in the default configuration (with resolve_entities=True) allows untrusted XML input to read local files.
Patches
lxml 6.1.0 changes the default to resolve_entities='internal', thus disallowing local file access by default.
Workarounds
Setting the resolve_entities option explicitly to resolve_entities='internal' or resolve_entities=False disables the local file access.
Resources
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.
NVD (es)
lxml es una biblioteca para procesar XML y HTML en el lenguaje Python. Anterior a 6.1.0, el uso de cualquiera de los dos analizadores en la configuración predeterminada (con resolve_entities=True) permite que una entrada XML no confiable lea archivos locales. Establecer la opción resolve_entities explícitamente a resolve_entities=’internal’ o resolve_entities=False deshabilita el acceso a archivos locales. Esta vulnerabilidad se corrige en 6.1.0.
References
| https://github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw | advisory, mitigation, vendor-advisory, web | |
| https://bugs.launchpad.net/lxml/+bug/2146291 | exploit, issue-tracking, report, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41066 | advisory | |
| https://github.com/lxml/lxml | package | |
| https://github.com/lxml/lxml/releases/tag/lxml-6.1.0 | web | |
| https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2026-87.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41066 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vfmq-68hx-4jfw changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-41066 changed 2026-11-11 | Public domain |
| PyPA Advisory Database | PYSEC-2026-87 changed 2026-05-20 | CC-BY-4.0 |