CVE-2018-19787
published 2018-12-02CVE-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…
PriorityP425medium6.1CVSS 3.1
AVNACLPRNUIRSCCLILAN
EPSS
2.44%
82.4th percentile
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.
Affected
18 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| debian | debian_linux | — | — |
| debian | lxml | < lxml 4.2.5-1 (bookworm) | lxml 4.2.5-1 (bookworm) |
| lxml | lxml | < 4.2.5 | 4.2.5 |
| lxml | lxml | >= 0 < 4.2.5-1 | 4.2.5-1 |
| lxml | lxml | >= 0 < 4.2.5-1 | 4.2.5-1 |
| lxml | lxml | >= 0 < 4.2.5-1 | 4.2.5-1 |
| lxml | lxml | >= 0 < 4.2.5-1 | 4.2.5-1 |
| lxml | lxml | >= 0 < 4.2.5 | 4.2.5 |
| msrc | cbl2_python-lxml_4.8.0-1_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| msrc | cm1_python-lxml_4.6.3-1_on_cbl_mariner_1.0 | — | — |
CVSS provenance
nvdv3.16.1MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
nvdv3.06.1MEDIUMCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
nvdv2.04.3MEDIUMAV:N/AC:M/Au:N/C:N/I:P/A:N
ghsa6.1MEDIUM
osv6.1MEDIUM
vendor_debian6.1MEDIUM
vendor_msrc6.1MEDIUM
vendor_redhat6.1MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Improper Neutralization of Input During Web Page Generation in LXML
osv·2022-05-13·CVSS 6.1
CVE-2018-19787 [MEDIUM] Improper Neutralization of Input During Web Page Generation in LXML
Improper Neutralization of Input During Web Page Generation in LXML
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.
GHSA
Improper Neutralization of Input During Web Page Generation in LXML
ghsa·2022-05-13·CVSS 6.1
CVE-2018-19787 [MEDIUM] CWE-79 Improper Neutralization of Input During Web Page Generation in LXML
Improper Neutralization of Input During Web Page Generation in LXML
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.
OSV
CVE-2018-19787: An issue was discovered in lxml before 4
osv·2018-12-02·CVSS 6.1
CVE-2018-19787 [MEDIUM] CVE-2018-19787: An issue was discovered in lxml before 4
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.
Microsoft
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 d
vendor_msrc·2018-12-11·CVSS 6.1
CVE-2018-19787 [MEDIUM] CWE-79 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 d
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See th
Ubuntu
lxml vulnerability
vendor_ubuntu·2018-12-10
CVE-2018-19787 lxml vulnerability
Title: lxml vulnerability
Summary: lxml could allow cross-site scripting (XSS) attacks.
USN-3841-1 fixed a vulnerability in lxml. This update provides
the corresponding update for Ubuntu 12.04 ESM.
Original advisory details:
It was discovered that lxml incorrectly handled certain HTML files.
An attacker could possibly use this issue to conduct cross-site scripting
(XSS) attacks.
Instructions: In general, a standard system update will make all the necessary changes.
Ubuntu
lxml vulnerability
vendor_ubuntu·2018-12-10
CVE-2018-19787 lxml vulnerability
Title: lxml vulnerability
Summary: lxml could allow cross-site scripting (XSS) attacks.
It was discovered that lxml incorrectly handled certain HTML files.
An attacker could possibly use this issue to conduct cross-site scripting
(XSS) attacks.
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
vendor_redhat·2018-09-09·CVSS 6.1
CVE-2018-19787 [MEDIUM] CWE-79 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
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.
Package: python-lxml (Red Hat Enterprise Linux 5) - Will not fix
Package: python-lxml (Red Hat Enterprise Linux 6) - Will not fix
Package: python-lxml (Red Hat Enterprise Linux 7) - Will not fix
Package: python-lxml (Red Hat Enterprise Linux 8) - Will not fix
Package: python-lxml (Red Hat Enterprise Linux OpenStack Platform 7 (Kilo)) - Will not fix
Package: python-lxml (Red Hat OpenStack Platform 10 (Newton)) - Will not
Debian
CVE-2018-19787: lxml - An issue was discovered in lxml before 4.2.5. lxml/html/clean.py in the lxml.htm...
vendor_debian·2018·CVSS 6.1
CVE-2018-19787 [MEDIUM] CVE-2018-19787: lxml - An issue was discovered in lxml before 4.2.5. lxml/html/clean.py in the lxml.htm...
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.
Scope: local
bookworm: resolved (fixed in 4.2.5-1)
bullseye: resolved (fixed in 4.2.5-1)
forky: resolved (fixed in 4.2.5-1)
sid: resolved (fixed in 4.2.5-1)
trixie: resolved (fixed in 4.2.5-1)
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py [fedora-all]
bugzilla·2018-12-17·CVSS 6.1
CVE-2018-19787 [MEDIUM] CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py [fedora-all]
CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affects multiple sup
Bugzilla
CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
bugzilla·2018-12-17·CVSS 6.1
CVE-2018-19787 [MEDIUM] CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
CVE-2018-19787 python-lxml: XSS in lxml.html.clean module in lxml/html/clean.py
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:
https://github.com/lxml/lxml/commit/6be1d081b49c97cfd7b3fbd934a193b668629109
Discussion:
Created python-lxml tracking bugs for this issue:
Affects: fedora-all [bug 1660236]
---
Easy to reproduce. As an example, 'poc' should be cleaned to 'poc' but isn't.
Apparently Internet Explorer can somehow execute "j a v a s c r i p t:" (with spaces). I don't have any experience with that, but I'll trust
https://github.com/lxml/lxml/commit/6be1d081b49c97cfd7b3fbd934a193b668629109https://lists.debian.org/debian-lts-announce/2018/12/msg00001.htmlhttps://lists.debian.org/debian-lts-announce/2020/11/msg00044.htmlhttps://usn.ubuntu.com/3841-1/https://usn.ubuntu.com/3841-2/https://github.com/lxml/lxml/commit/6be1d081b49c97cfd7b3fbd934a193b668629109https://lists.debian.org/debian-lts-announce/2018/12/msg00001.htmlhttps://lists.debian.org/debian-lts-announce/2020/11/msg00044.htmlhttps://usn.ubuntu.com/3841-1/https://usn.ubuntu.com/3841-2/
2018-12-02
Published