CVE-2026-41066: lxml · Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
Affects snapcraftSource GCVE Database
Not known to be exploited · CVSS 7.5 High : upgrade to 8.14.5_1 or 7.5.4 soon.
Data as of 4 Dec 2026, 18:37 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 7.5 |
|---|
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 27% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 8.14.5_1, 7.5.4, 6.1.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 24 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.
What to do
Upgrade snapcraft to 8.14.5_1 or 7.5.4; lxml to 6.1.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewsnapcraftpkg:brew/snapcraftOther threats | Affected
| Fixed in
|
PyPIlxmlpkg:pypi/lxmlOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and fixed versions include 7.5.4 and 8.14.5_1. Users should upgrade to these or later versions to mitigate the vulnerability. Alternatively, users can explicitly set the resolve_entities option to 'internal' or false in the affected parsers to disable local file access. No other actions are required if these mitigations are applied.
Description
The lxml library's default configuration for the iterparse() and ETCompatXMLParser() functions allows XML External Entity (XXE) attacks that can read local files. This occurs because the default setting for resolve_entities was true, enabling entity resolution that exposes local file content. The issue affects versions from 4.8.1 up to but not including 7.5.4, and from 8.0.3 up to but not including 8.14.5_1. The vulnerability is fixed in versions 7.5.4 and 8.14.5_1 by changing the default resolve_entities setting to 'internal', which disables local file access by default. Users can also mitigate the issue by explicitly setting resolve_entities to 'internal' or false. The CVSS score is 7.5, indicating a high severity vulnerability with network attack vector and no privileges or user interaction required.
References
- github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-41066 (opens in a new tab)
- bugs.launchpad.net/lxml/+bug/2146291 (opens in a new tab)
- github.com/lxml/lxml (opens in a new tab)
- github.com/lxml/lxml/releases/tag/lxml-6.1.0 (opens in a new tab)
- github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2026-87.yaml (opens in a new tab)