CVE-2026-41066
lxml: python: lxml: Information disclosure via untrusted XML input leading to local file read
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 25, 2026
Updated · August 21, 2026
Description
A flaw was found in lxml, a library for processing XML and HTML in Python. A remote attacker can exploit this vulnerability by sending untrusted XML input to an application using lxml's default parser configuration. This allows the attacker to read local files on the system, leading to information disclosure.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Applications using the lxml library to process untrusted XML input should explicitly configure the parser to prevent external entity resolution. This can be achieved by setting the resolve_entities option to False or 'internal' when initializing the parser. For example, etree.XML(xml_input, parser=etree.XMLParser(resolve_entities=False)) or etree.HTML(html_input, parser=etree.HTMLParser(resolve_entities='internal')).
CVSS / CWE
CVSS 3.1 · 5.9CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE-611 · Improper Restriction of XML External Entity Reference