Junglewise Threat Intelligence

CVE-2026-41066: lxml XXE in iterparse and ETCompatXMLParser

CVE-2026-41066 · Severity: high · CVSS 7.5 · Published 2026-04-21

Vendors: PyPI.

Executive brief

A vulnerability in the lxml Python library, which is widely used for processing XML and HTML data, could allow an attacker to read sensitive files from the local server. By providing a specially crafted XML file to an application using certain lxml functions, an attacker can trick the system into disclosing local data. This could lead to the exposure of configuration files, credentials, or other private information stored on the host machine.

Technical details

A XML External Entity (XXE) vulnerability (CWE-611) exists in lxml's iterparse() and ETCompatXMLParser() components. The root cause is a default configuration where 'resolve_entities' is set to True, allowing the parser to resolve external entities in untrusted XML input. A remote, unauthenticated attacker can exploit this by submitting a malicious XML document that references local file URIs, which the parser will then resolve and potentially expose in its output. This was addressed in version 6.1.0 by changing the default behavior to 'internal' entity resolution only.

Affected products

  • lxml lxml < 6.1.0

Timeline

  • 2026-04-18: disclosed: Original report on Launchpad
  • 2026-04-21: advisory: GitHub Advisory published
  • 2026-04-24: other: NVD publication date

References

Related threats