CVE Professor
/
All CVEs
CVE-2026-141556

CVE-2026-141556 — Lxml-html-clean — CWE-79 · CWE-184

MEDIUM CVSS 4.7 ⚡ EPSS 0.4% GitHub

## Summary When `safe_attrs_only=False`, the Cleaner still tries to remove JavaScript (`javascript=True` is the default): it deletes `on*` attributes (`lxml_html_clean/clean.py:381-389` in 0.4.6) and blanks `javascript:` URLs through `doc.rewrite_links(self._remove_javascript_link)` (`clean.py:390`). `rewrite_links` only visits the attributes listed in `lxml.html.defs.link_attrs`, and two kinds of attributes that can carry script are not on that list: 1. `srcdoc` on `<iframe>`. Its value is a complete HTML document that the browser renders inside the frame. With `host_whitelist` set, the `<iframe>` itself is kept, and `srcdoc` takes priority over `src`, so the whitelisted `src` no longer matters. 2. `to`, `values` (and `from`, `by`) on the SVG animation elements `<set>` and `<animate>`. With `attributeName="href"` they set the `href` of the enclosing SVG `<a>` at runtime, so `javascript:` ends up on the link even though the Cleaner removed it from `href` itself. This one also needs `remove_unknown_tags=False`, otherwise `<set>`/`<animate>` are dropped. This is the same root cause as GHSA-4jhm-jv67-739f (`xlink:href` with `safe_attrs_only=False`): an attribute missing from `link_attrs` (CWE-184). In both configurations below the same Cleaner turns `href="javascript:..."` into `href=""` and deletes `onclick`, so script removal is clearly still meant to apply. The default `Cleaner()` is not affected: `safe_attrs_only=True` removes `srcdoc`, `to` and `values`. ## Affected ve

## Summary When `safe_attrs_only=False`, the Cleaner still tries to remove JavaScript (`javascript=True` is the default): it deletes `on*` attributes (`lxml_html_clean/clean.py:381-389` in 0.4.6) and blanks `javascript:` URLs through `doc.rewrite_links(self._remove_javascript_link)` (`clean.py:390`). `rewrite_links` only visits the attributes listed in `lxml.html.defs.link_attrs`, and two kinds of attributes that can carry script are not on that list: 1. `srcdoc` on `<iframe>`. Its value is a complete HTML document that the browser renders inside the frame. With `host_whitelist` set, the `<iframe>` itself is kept, and `srcdoc` takes priority over `src`, so the whitelisted `src` no longer matters. 2. `to`, `values` (and `from`, `by`) on the SVG animation elements `<set>` and `<animate>`. With `attributeName="href"` they set the `href` of the enclosing SVG `<a>` at runtime, so `javascript:` ends up on the link even though the Cleaner removed it from `href` itself. This one also needs `remove_unknown_tags=False`, otherwise `<set>`/`<animate>` are dropped. This is the same root cause as GHSA-4jhm-jv67-739f (`xlink:href` with `safe_attrs_only=False`): an attribute missing from `link_attrs` (CWE-184). In both configurations below the same Cleaner turns `href="javascript:..."` into `href=""` and deletes `onclick`, so script removal is clearly still meant to apply. The default `Cleaner()` is not affected: `safe_attrs_only=True` removes `srcdoc`, `to` and `values`. ## Affected ve

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction Required UI:R
Scope Changed S:C
Confidentiality Low C:L
Integrity Low I:L
Availability None A:N
EPSS — Exploit Prediction Scoring System
0.4%
30-day probability
In the 35. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-141556
CVSS 4.7/10 · MEDIUM · 02.12.2026
CWE: CWE-79, CWE-184
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Cross-Site Scripting (XSS)
Summary: ## Summary

When safe_attrs_only=False, the Cleaner still tries to remove JavaScript (javascript=True is the default): it deletes on* attributes (lxml_html_clean/clean.py:381-389 in 0.4.6) and blanks javascript: URLs through doc.rewrite_links(self._remove_javascript_link) (clean.py:390). rewrite_links only visits the attributes listed in lxml.html.defs.link_attrs, and two kind…
Affected: lxml-html-clean

⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · user interaction required (UI:R).
⚠️ Scope changes (S:C) — impact can cross security boundaries.

🌍 REAL WORLD IMPACT
All confidential data readable/stealable; limited integrity modification (I:L); pivot to other systems possible.

🛡️ REMEDIATION
→ Apply vendor security update for lxml-html-clean.
→ Add CSP headers, HTML-encode all user input.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
📋 Routine update cycle (30 days)

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
4.7 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-79 CWE-184
Affected Products (1)
lxml-html-clean
References & Advisories (4)
Related CVEs
9.8
CVE-2026-105104
Use of hard-coded credentials in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlie
9.3
CVE-2026-144337
osTicket before 1.17.9 and 1.18.0 before 1.18.5 contains an unauthenticated stored cross-site scripting vulner
9.0
CVE-2026-145039
SiYuan before 3.8.11 contains a stored cross-site scripting vulnerability in the protyle asset picker's render
8.8
CVE-2026-145062
SiYuan 3.8.10 before 3.8.11 fails to escape custom block attribute names from imported .sy.zip files in openFi
8.3
CVE-2026-145038
SiYuan 3.8.8-alpha.4 before 3.8.11 contains a stored cross-site scripting vulnerability because the unused ass
7.5
CVE-2026-145078
SiYuan before 3.8.11 contains a stored cross-site scripting vulnerability because the transactions WebSocket p
7.1
CVE-2026-136044
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Nks Resp