CVE-2026-41066
JSON

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 packageVersionsReported by
lxml lxml< 6.1.0, before 6.1.0CVE List, NVD
lxml (PyPI)before 6.1.0GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
PyPA Advisory Database7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-611

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

Sources

SourceRecordLicence
CVE ListCVE-2026-41066 changed 2026-04-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-vfmq-68hx-4jfw changed 2026-09-10CC-BY-4.0
NVDCVE-2026-41066 changed 2026-11-11Public domain
PyPA Advisory DatabasePYSEC-2026-87 changed 2026-05-20CC-BY-4.0