PyPI: lxml

CVE-2020-27783

Safety vulnerability ID: SFTY-20201203-77539

Safety legacy ID: pyup.io-39194

Lxml 4.6.2 includes a fix for CVE-2020-27783: A XSS vulnerability was discovered in python-lxml's clean module. The module's parser didn't properly imitate browsers, which caused different behaviors between the sanitizer and the user's page. A remote attacker could exploit this flaw to run arbitrary HTML/JS code.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

lxml vulnerable to Cross-site Scripting

Advisory

Lxml 4.6.2 includes a fix for CVE-2020-27783: A XSS vulnerability was discovered in python-lxml's clean module. The module's parser didn't properly imitate browsers, which caused different behaviors between the sanitizer and the user's page. A remote attacker could exploit this flaw to run arbitrary HTML/JS code.

Affected Package

Affecting lxml package, versions<4.6.2

Also affects

---

How to Fix

Upgradelxmlto4.6.2or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more