{"id":"CVE-2026-41066","aliases":["GHSA-vfmq-68hx-4jfw","PYSEC-2026-87"],"title":"lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files","summary":"lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files","severity":"high","cvss":7.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","vendor":"lxml","product":"lxml","ecosystem":"pip","affected":["lxml < 6.1.0"],"patched":["lxml 6.1.0"],"published":"2026-04-21","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:51:03.302383702Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-vfmq-68hx-4jfw","references":[{"url":"https://github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41066"},{"url":"https://bugs.launchpad.net/lxml/+bug/2146291"},{"url":"https://github.com/lxml/lxml"},{"url":"https://github.com/lxml/lxml/releases/tag/lxml-6.1.0"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2026-87.yaml"}],"tags":["osv","pip"],"epss":0.00324,"epssPercentile":0.25759,"ingestedAt":"2026-09-12T03:13:01.730Z","slug":"CVE-2026-41066","body":"## Overview\n\n### Impact\nUsing either of the two parsers in the default configuration (with `resolve_entities=True`) allows untrusted XML input to read local files.\n\n### Patches\nlxml 6.1.0 changes the default to `resolve_entities='internal'`, thus disallowing local file access by default.\n\n### Workarounds\nSetting the `resolve_entities` option explicitly to `resolve_entities='internal'` or `resolve_entities=False` disables the local file access.\n\n### Resources\nOriginal report: https://bugs.launchpad.net/lxml/+bug/2146291\n\nThe 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.\n\n## Affected packages\n\n- `lxml < 6.1.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `lxml 6.1.0`","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}