CVE-2018-19787
Improper Neutralization of Input During Web Page Generation in LXML
Reported by mitre · Published December 2, 2018
lxml is fixed in 4.2.5 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| lxml | PyPI | 4.2.5 |
| python-lxml-docs | Amazon Linux | 3.2.1-4.amzn2.0.4 |
| lxml | Ubuntu:16.04:LTS | 3.5.0-1ubuntu0.1 |
| lxml | lxml | 4.2.5 |
| lxml | Ubuntu:14.04:LTS | 3.3.3-1ubuntu0.2 |
| lxml | Ubuntu:18.04:LTS | 4.2.1-1ubuntu0.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | python-lxml-docs | 0 |
| PyPI | lxml | 0 |
| lxml | lxml | |
| n/a | n/a | * |
| amazon:2 | python-lxml | 0 |
Timeline
- Dec 2, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Dec 23, 2025 CVE Updated
- Mar 6, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 6, 2026 Security Advisory (4 in total, the first dated here)
- Sep 22, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-19787
vulnetix vdb fixes CVE-2018-19787
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-19787/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- USN-3841-1 vendor-advisoryx_refsource_UBUNTU
- [debian-lts-announce] 20181210 [SECURITY] [DLA 1604-1] lxml security update mailing-listx_refsource_MLIST
- USN-3841-2 vendor-advisoryx_refsource_UBUNTU
- x_refsource_MISC
- [debian-lts-announce] 20201126 [SECURITY] [DLA 2467-1] lxml security update mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2018-19787 advisory
- https://github.com/advisories/GHSA-xp26-p53h-6h2p advisory
- https://github.com/lxml/lxml url
- https://github.com/pypa/advisory-database/tree/main/vulns/lxml/PYSEC-2018-12.yaml advisory
- https://usn.ubuntu.com/3841-1 url
- https://usn.ubuntu.com/3841-2 url