lxml CVE-2026-41066
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted XML to parsing endpoint
-
DeliveryDOCTYPE defines external file entity
-
Exploititerparse/ETCompatXMLParser resolves entity
-
ExecutionParser reads local file contents
-
ImpactSensitive file data returned or exfiltrated
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML external entity prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application parse attacker-controlled XML using one of two specific lxml APIs in their default configuration: iterparse() or ETCompatXMLParser() with resolve_entities=True (the pre-6.1.0 default). Applications using lxml's standard etree.XMLParser/HTMLParser are NOT affected, since those defaulted to the safe setting in 5.0. No authentication or user interaction is needed (PR:N/UI:N), and it works against default configurations of those two parsers. Limiting factors: the application must actually reach one of the two vulnerable parsers with untrusted input, must be running lxml < 6.1.0, and meaningful data exfiltration typically requires the app to reflect parsed content back or permit out-of-band (blind XXE) retrieval; a purely internal parse that discards output limits practical impact. |
| Impact | The signals are consistent but point to low real-world urgency despite the High CVSS. The CVSS 3.1 base score of 7.5 reflects an easy network vector (AV:N/AC:L/PR:N/UI:N) with High confidentiality impact and no integrity/availability effect - accurate for the raw primitive. However, EPSS is only 0.03% (9th percentile), no CISA KEV listing exists, and CISA SSVC records Exploitation: none with Technical Impact: partial, all indicating this is not under active or opportunistic attack. SSVC Automatable: yes is worth noting: because exploitation needs no authentication or user interaction, it could be scripted against any exposed vulnerable endpoint. The key nuance the CVSS score hides is scope of exposure: the flaw is only reachable if the host application specifically calls iterparse() or ETCompatXMLParser() on attacker-controlled XML - most lxml usage (the default etree parser) was already safe since 5.0. Also, real-world confidentiality impact depends on the application returning parsed content or supporting out-of-band exfiltration; blind XXE may limit true impact below C:H. Overall: a genuine but conditional issue, high-priority to patch only for applications known to use the two affected parsers on untrusted input. |
| Exploit ScenarioDerived | An application ingests user-supplied XML - for example an API endpoint, file-upload feature, or webhook - and streams it through lxml's iterparse() or ETCompatXMLParser() with default settings. The attacker submits an XML document containing a DOCTYPE that defines an external entity referencing file:///etc/passwd (or an application secret/config file), and the parser resolves it, embedding the file contents into the parsed output returned to or observable by the attacker. No public exploit code is identified at this time, but the technique is standard XXE and requires no authentication or user interaction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
Local file disclosure via XML External Entity (XXE) injection affects the lxml Python library (versions < 6.1.0) when applications parse untrusted XML using iterparse() or ETCompatXMLParser(), whose default configuration left resolve_entities=True. An unauthenticated remote attacker who can submit crafted XML to such an endpoint can read arbitrary local files readable by the process. There is no public exploit identified at time of analysis and EPSS risk is very low (0.03%), but exploitation is trivial (CVSS 7.5, AV:N/AC:L/PR:N/UI:N) wherever these two specific parsers are used.
RemediationAI
Vendor-released patch: lxml 6.1.0 - upgrade to lxml >= 6.1.0, which changes the default to resolve_entities='internal' for all parsers including iterparse() and ETCompatXMLParser(), disabling local file access by default (release: https://github.com/lxml/lxml/releases/tag/lxml-6.1.0; advisory: https://github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw). If immediate upgrade is not possible, apply the vendor workaround in code by explicitly passing resolve_entities='internal' (preserves internal entity expansion) or resolve_entities=False (disables entity resolution entirely) to every iterparse() and ETCompatXMLParser() call that processes untrusted XML; the trade-off is that resolve_entities=False will break any legitimate document that depends on entity substitution, so validate that dependent XML still parses correctly. For distro-packaged installations (SUSE, Red Hat), apply the vendor backport once released rather than side-loading pip. As defense in depth, ensure the parsing process runs with least-privilege filesystem access so that even a successful XXE reads little of value.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
lxml is a widely used Python binding to the libxml2/libxslt C libraries for XML and HTML processing. The root cause is CWE-611 (Improper Restriction of XML External Entity Reference): when a parser resolves external entities, an attacker-supplied DOCTYPE declaration can define an entity pointing at a local file path (e.g. file:///etc/passwd), and the parser substitutes the file contents into the document. lxml hardened its mainline XML and HTML parsers in 5.0 by switching the default to resolve_entities='internal', but two legacy entry points - the streaming iterparse() API and the ETCompatXMLParser() compatibility class - were overlooked and continued defaulting to resolve_entities=True. The affected component is the pip package lxml (CPE pkg:pip/lxml); the flaw is in the parser default configuration, not in libxml2 itself.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Remote, unauthenticated, no interaction against the default parser config yields AV:N/AC:L/PR:N/UI:N; arbitrary local file read gives C:H with no integrity or availability impact.
Primary rating from Vendor (https://github.com/lxml/lxml).
CVSS VectorVendor: https://github.com/lxml/lxml
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
The lxml Python library (versions prior to 6.1.0) contains a vulnerability that allows remote attackers to read sensitive files from affected servers without authentication. This could expose confidential data, credentials, and system configurations for any organization using affected versions-particularly those processing untrusted XML documents.
Vendor-released patch: lxml 6.1.0 or later. If patching is delayed, disable XXE resolution by setting resolve_entities=False in iterparse() and ETCompatXMLParser() configurations.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
XML External Entity (XXE) attacks exploit XML parsers that process Document Type Definitions (DTDs) without proper restrictions.
Affected Products (CPE)CVE.org
Vendor StatusVendor
SUSE
| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
GHSA-vfmq-68hx-4jfw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB