lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | lxml | < 6.1.0 | 6.1.0 |
Referencias
- https://github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw
- https://bugs.launchpad.net/lxml/+bug/2146291
- https://nvd.nist.gov/vuln/detail/CVE-2026-41066
- https://github.com/lxml/lxml
- https://github.com/lxml/lxml/releases/tag/lxml-6.1.0
- https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2026-87.yaml
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Debilidad (CWE)
CWE-611- Plataforma
- Python (PyPI)
- Paquete
lxml- Publicada
- 21.04.2026
- Actualizado
- 11.10.2026 15:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-87 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-vfmq-68hx-4jfw - CC BY 4.0
Historial de vulnerabilidades: lxml
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 7
- Primera → última
- 05.2014 04.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 1
- Media 6
Divulgaciones por año
- 2017: 0
- 2018: 1
- 2019: 0
- 2020: 1
- 2021: 2
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 1
antes: 1
-
lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.