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.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Python (PyPI) | lxml | < 6.1.0 | 6.1.0 |
Verweise
- 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
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Schwäche (CWE)
CWE-611- Plattform
- Python (PyPI)
- Paket
lxml- Veröffentlicht
- 21.04.2026
- Aktualisiert
- 11.10.2026 15:17
Quellen und Lizenzen
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
Schwachstellenhistorie: lxml
Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 7
- Erste → letzte
- 05.2014 04.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 1
- Mittel 6
Veröffentlichungen pro Jahr
- 2017: 0
- 2018: 1
- 2019: 0
- 2020: 1
- 2021: 2
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 1
früher: 1
-
lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.