CVE-2021-43818: HTML Cleaner allows crafted and SVG embedded scripts to pass through
Impact The HTML Cleaner in lxml.html lets certain crafted script content pass through, as well as script content in SVG files embedded using data URIs.
Users that employ the HTML cleaner in a security relevant context should upgrade to lxml 4.6.5.
Patches The issue has been resolved in lxml 4.6.5.
Workarounds None.
References The issues are tracked under the report IDs GHSL-2021-1037 and GHSL-2021-1038.
Other sources
lxml could allow a remote attacker to bypass security restrictions, caused by a flaw in HTML Cleaner in lxml.html. By sending a specially-crafted script content, an attacker could exploit this vulnerability to allow crafted and SVG embedded scripts to pass through.
— IBM
lxml is a library for processing XML and HTML in the Python language. Prior to version 4.6.5, the HTML Cleaner in lxml.html lets certain crafted script content pass through, as well as script content in SVG files embedded using data URIs. Users that employ the HTML cleaner in a security relevant context should upgrade to lxml 4.6.5 to receive a patch. There are no known workarounds available.
There's a flaw in python-lxml's HTML Cleaner component, which is responsible for sanitizing HTML and Javascript. An attacker who is able to submit a crafted payload to a web service using python-lxml's HTML Cleaner may be able to trigger script execution in clients such as web browsers. This can occur because the HTML Cleaner did not remove scripts within SVG images in data URLs such as <img src="">. XSS can result in impacts to the integrity and availability of the web page, as well as a potential impact to data confidentiality in some circumstances.
Affected Software
Remediation
Patch Available
Patch Available
Information
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2021-43818?
CVE-2021-43818 is a vulnerability in python-lxml's HTML Cleaner component that allows an attacker to trigger script execution in clients.
How does CVE-2021-43818 affect python-lxml?
CVE-2021-43818 affects python-lxml versions prior to 4.6.5.
What is the severity of CVE-2021-43818?
CVE-2021-43818 has a severity rating of 8.8 (High).
How can the CVE-2021-43818 vulnerability be fixed?
To fix the CVE-2021-43818 vulnerability, upgrade python-lxml to version 4.6.5 or higher.
Where can I find more information about CVE-2021-43818?
You can find more information about CVE-2021-43818 at the following references: [link1], [link2], [link3].