lxml XML Parsing Vulnerability Exposes Local Files

lxml XML Parsing Vulnerability Exposes Local Files

The National Vulnerability Database has detailed CVE-2026-41066, a high-severity vulnerability in lxml, a widely used Python library for XML and HTML processing. Prior to version 6.1.0, lxml’s default configuration allows untrusted XML input to read local files when either of its two parsers are used with resolve_entities=True. This is a classic XML External Entity (XXE) vulnerability, a persistent headache for defenders.

This flaw is critical because it enables arbitrary file disclosure from the server hosting the vulnerable application. An attacker can craft malicious XML to exfiltrate sensitive configuration files, source code, or even user data if the application processes untrusted XML. The impact is direct and severe: data theft, potentially leading to further system compromise.

The fix, available in lxml version 6.1.0, addresses this by providing explicit control over entity resolution. Defenders must either upgrade to the patched version or ensure resolve_entities is explicitly set to 'internal' or False to mitigate the risk. Ignoring this means leaving a wide-open door to sensitive system files.

What This Means For You

  • If your Python applications use lxml to parse XML, you are exposed. Attackers are constantly scanning for these types of XXE flaws. Check your lxml version immediately. Upgrade to 6.1.0 or newer, or explicitly configure `resolve_entities='internal'` or `resolve_entities=False` in your parser settings. This isn't theoretical; it's a direct path to your sensitive data.
🛡️ Am I exposed to this? Get detection rules for CVE-2026-41066 — Splunk, Sentinel, Elastic, QRadar & more

Related ATT&CK Techniques

🛡️ Detection Rules

3 rules · 6 SIEM formats

3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.

critical T1190 Initial Access

Detect lxml XML External Entity (XXE) File Read Attempt - CVE-2026-41066

Sigma YAML — free preview
title: Detect lxml XML External Entity (XXE) File Read Attempt - CVE-2026-41066
id: scw-2026-04-24-ai-1
status: experimental
level: critical
description: |
  This rule detects attempts to exploit CVE-2026-41066 by looking for XML payloads within web server requests that contain common XXE indicators like DOCTYPE declarations and SYSTEM keywords, combined with a 'file://' URI scheme, suggesting an attempt to read local files via the vulnerable lxml parser.
author: SCW Feed Engine (AI-generated)
date: 2026-04-24
references:
  - https://shimiscyberworld.com/posts/nvd-CVE-2026-41066/
tags:
  - attack.initial_access
  - attack.t1190
logsource:
    category: webserver
detection:
  selection:
      cs-uri-query|contains:
          - '<?xml'
          - '<!DOCTYPE'
          - 'SYSTEM'
          - 'PUBLIC'
      cs-uri-query|contains:
          - 'file://'
  condition: selection
falsepositives:
  - Legitimate administrative activity

Source: Shimi's Cyber World · License & reuse

✓ Sigma · Splunk SPL Sentinel KQL Elastic QRadar AQL Wazuh Get rules for your SIEM →

Indicators of Compromise

IDTypeIndicator
CVE-2026-41066 Information Disclosure lxml library versions prior to 6.1.0
CVE-2026-41066 Information Disclosure lxml XML/HTML parsers with resolve_entities=True
CVE-2026-41066 Information Disclosure Untrusted XML input leading to local file read
Source & Attribution
Source PlatformNVD
ChannelNational Vulnerability Database
PublishedApril 24, 2026 at 20:16 UTC

This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.

Believe this infringes your rights? Submit a takedown request.

Related Posts

CVE-2026-42044 — Privilege Escalation

CVE-2026-42044 — Axios is a promise based HTTP client for the browser and Node.js. From 1.0.0 to before 1.15.2, he Axios library is vulnerable to...

vulnerabilityCVEmedium-severityprivilege-escalationcwe-915cwe-1321
/SCW Vulnerability Desk /MEDIUM /6.5 /⚑ 3 IOCs /⚙ 3 Sigma

Axios CVE-2026-42043: NO_PROXY Bypass Vulnerability

CVE-2026-42043 — Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, an attacker who can influence the...

vulnerabilityCVEhigh-severitycwe-183cwe-441cwe-918
/SCW Vulnerability Desk /HIGH /7.2 /⚑ 3 IOCs /⚙ 4 Sigma

CVE-2026-42042 — Axios is a promise based HTTP client for the browser and

CVE-2026-42042 — Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, the Axios library's XSRF token protection...

vulnerabilityCVEmedium-severitycwe-183cwe-201
/SCW Vulnerability Desk /MEDIUM /5.4 /⚑ 3 IOCs /⚙ 3 Sigma