KeygraphLabs · CVE MCP

CVE-2018-19787 · mitre

CVE-2018-19787

An issue was discovered in lxml before 4.2.5. lxml/html/clean.py in the lxml.html.clean module does not remove javascript: URLs that use escaping, allowing a remote attacker to conduct XSS attacks, as demonstrated by "j a v a s c r i p t:" in Internet Explorer. This is a similar issue to CVE-2014-3146.

Published 2018-12-02, last changed 2026-06-17. Weakness: CWE-79.

CVSS
6.1
medium, from NVD
EPSS
2.43%
percentile 84.8%, chance of exploitation in 30 days
Exploitation
None known
no KEV listing or public exploit in our indexes

How to fix

Upgrade to a fixed version: lxml 4.2.5 (PyPI). For the version that clears every advisory for your installed version, ask an agent for get_remediation.

Where the flaw is in the code

Fixed in lxml/lxml by 6be1d081b4, 1dee355e83. Functions changed by the fix: _remove_javascript_link, pygments_directive. Regression tests: src/lxml/html/tests/test_clean.txt. Confidence: verified (a record names this commit as the fix, and it changed these functions).

Timeline

2018-12-02Published
2018-12-02Package advisory PYSEC-2018-12
2022-05-13Package advisory GHSA-xp26-p53h-6h2p
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 2.43%
2026-12-02Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-xp26-p53h-6h2plxml (PyPI)4.2.5
PYSEC-2018-12lxml (PyPI)4.2.5

Also known as: GHSA-xp26-p53h-6h2p, PYSEC-2018-12

Related

CVEPublishedCVSSSummary
CVE-2026-410662026-04-247.5lxml: Default configuration of iterparse() and ETCompatXMLParser() allows XXE to local files
CVE-2022-23092022-07-057.5NULL Pointer Dereference in lxml/lxml
CVE-2021-438182021-12-137.1HTML Cleaner allows crafted and SVG embedded scripts to pass through
CVE-2021-289572021-03-216.1same package: lxml (PyPI)
CVE-2020-277832020-12-036.1same package: lxml (PyPI)
CVE-2014-31462014-05-144.3same package: lxml (PyPI)
CVE-2026-1377132026-11-276.4same weakness (CWE-79) from the same CNA (mitre)
CVE-2026-1286662026-11-186.1same weakness (CWE-79) from the same CNA (mitre)

Add it to your agent

One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.

claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp

Then ask for triage_cve CVE-2018-19787, or call /api/v1/vulnerabilities/CVE-2018-19787. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org