Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. lxml
  4. ›
  5. CVE-2018-19787

CVE-2018-19787: Improper Neutralization of Input During Web Page Generation in LXML

May 13, 2022 (updated December 20, 2025)

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.

References

  • github.com/advisories/GHSA-xp26-p53h-6h2p
  • github.com/lxml/lxml
  • github.com/lxml/lxml/commit/6be1d081b49c97cfd7b3fbd934a193b668629109
  • github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2018-12.yaml
  • lists.debian.org/debian-lts-announce/2018/12/msg00001.html
  • lists.debian.org/debian-lts-announce/2020/11/msg00044.html
  • nvd.nist.gov/vuln/detail/CVE-2018-19787
  • usn.ubuntu.com/3841-1
  • usn.ubuntu.com/3841-2

Code Behaviors & Features

Detect and mitigate CVE-2018-19787 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.2.5

Fixed versions

  • 4.2.5

Solution

Upgrade to version 4.2.5 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/lxml/CVE-2018-19787.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:42 +0000.