CVE-2018-19787Lxml
Medium 6.1 No auth needed
Follow: this CVE · Lxml · Lxml We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 2.4% probability of exploitation in 30 days · percentile 85
- Auth required
- No
- Published
- Dec 2, 2018
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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
- Apply the vendor's security update for Lxml.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | lxml |
< 4.2.5 |
4.2.5 |
pip install "lxml>=4.2.5" |
| PyPI | lxml |
< 4.2.5 |
4.2.5 |
pip install "lxml>=4.2.5" |
Per OSV / GitHub Advisories (GHSA-xp26-p53h-6h2p, PYSEC-2018-12). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| lxml | lxml | < 4.2.5 |
| debian | debian_linux | 8.0 |
| canonical | ubuntu_linux | 12.04 |
| canonical | ubuntu_linux | 14.04 |
| canonical | ubuntu_linux | 16.04 |
| canonical | ubuntu_linux | 18.04 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Vendor Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org
- usn.ubuntu.com Third Party Advisory
- usn.ubuntu.com Third Party Advisory