Skip to content
Fencer Vulns
medium 6.1

CVE-2020-27783 json

lxml vulnerable to Cross-site Scripting

published 2020-12-03 5 y ago modified 2026-06-17 4 mo ago also GHSA-pgww-xf46-h92r , PYSEC-2020-62 , EUVD-2020-0102

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
4.0%
EPSS 4.0% chance of exploitation in 30 days, percentile 90%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi lxml 4.6.2
  • lxml lxml 4.6.2
  • lxml Debian 14, Debian 13, Debian 12 4.6.2-1

debian advisories DEBIAN-CVE-2020-27783

  • lxml Ubuntu 16.04 LTS 3.5.0-1ubuntu0.3
  • lxml Ubuntu 18.04 LTS 4.2.1-1ubuntu0.3
  • lxml Ubuntu 20.04 LTS 4.5.0-1ubuntu0.2
  • lxml Ubuntu Pro 14.04 LTS 3.3.3-1ubuntu0.2+esm2

ubuntu advisories UBUNTU-CVE-2020-27783

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-python38-babel RHEL 3 SOFTWARE_COLLECTIONS 2.7.0-12.el7
  • rh-python38-python RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-pip RHEL 3 SOFTWARE_COLLECTIONS 19.3.1-2.el7
  • rh-python38-python-idle RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-lxml RHEL 3 SOFTWARE_COLLECTIONS 4.4.1-7.el7
  • rh-python38-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-babel RHEL 3 SOFTWARE_COLLECTIONS 2.7.0-12.el7

red hat advisories RHSA-2021:3254RHSA-2021:1761RHSA-2021:1879RHSA-2021:1898

  • python-lxml openSUSE Leap 15.3 4.0.0-150000.4.3.1
  • python3-lxml SLES for SAP 12 SP5, SLES 12 SP5 3.6.1-3.3.1
  • python3-lxml SLE Module for Public Cloud 12 3.3.5-3.12.1
  • grafana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 6.7.4-3.26.1
  • python-lxml OpenStack Cloud Crowbar 9, OpenStack Cloud 9 4.2.4-3.3.1
  • python-Pillow OpenStack Cloud Crowbar 9, OpenStack Cloud 9 5.2.0-3.17.1
  • ardana-barbican OpenStack Cloud 9 9.0+git.1644879908.8a641c1-3.13.1
  • rubygem-sinatra OpenStack Cloud Crowbar 9 1.4.6-4.3.1

suse advisories SUSE-SU-2022:3836-1SUSE-SU-2022:3461-1SUSE-SU-2022:3460-1SUSE-SU-2022:1729-1SUSE-SU-2022:0895-1SUSE-SU-2022:0803-1

  • python-lxml openSUSE Leap 15.3 4.7.1-3.7.1

opensuse advisories openSUSE-SU-2022:0803-1

  • python38-ply AlmaLinux 8 3.11-10.module_el8.6.0+2778+cd494b30
  • python38-six AlmaLinux 8 1.12.0-10.module_el8.6.0+2778+cd494b30
  • python38-cffi AlmaLinux 8 1.13.2-3.module_el8.6.0+2778+cd494b30
  • python38-idna AlmaLinux 8 2.8-6.module_el8.6.0+2778+cd494b30
  • python38-pytz AlmaLinux 8 2019.3-3.module_el8.6.0+2778+cd494b30
  • python38-scipy AlmaLinux 8 1.3.1-4.module_el8.6.0+2778+cd494b30
  • python38-Cython AlmaLinux 8 0.29.14-4.module_el8.6.0+2778+cd494b30
  • python38-chardet AlmaLinux 8 3.0.4-19.module_el8.6.0+2778+cd494b30

almalinux advisories ALSA-2021:1879ALSA-2021:1761

  • python-lxml Rocky Linux 8 4.2.3-2.el8
  • pytz Rocky Linux 8 2019.3-3.module+el8.4.0+570+c2eaf144
  • babel Rocky Linux 8 2.7.0-10.module+el8.4.0+570+c2eaf144
  • numpy Rocky Linux 8 1.17.3-5.module+el8.4.0+570+c2eaf144
  • scipy Rocky Linux 8 1.3.1-4.module+el8.5.0+672+ab6eb015
  • scipy Rocky Linux 8 1.3.1-4.module+el8.4.0+570+c2eaf144
  • Cython Rocky Linux 8 0.29.14-4.module+el8.4.0+570+c2eaf144
  • PyYAML Rocky Linux 8 5.3.1-1.module+el8.4.0+570+c2eaf144

rocky linux advisories RLSA-2021:1898RLSA-2021:1879RLSA-2021:1761

  • py3-lxml Alpine 3.12 4.5.1-r1
  • py3-lxml Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 4.6.2-r0

alpine advisories ALPINE-CVE-2020-27783

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-lxml CBL-Mariner 2.0 4.8.0-1

azure linux advisories AZL-6807

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • python-lxml Arch Linux 4.6.2-1

arch linux advisories AVG-1319

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2020-27783 updated cvss 6.1

python-lxml: mXSS due to the use of improper parser

  • Red Hat Enterprise Linux 5 python-lxml Red Hat Enterprise Linux 6 python-lxml Red Hat Enterprise Linux 7 python-lxml Red Hat OpenStack Platform 10 (Newton) python-lxml
    affected: no fix planned “Out of support scope”
  • Red Hat OpenStack Platform 13 (Queens) python-lxml
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux AppStream (v. 8) python-lxml 4.2.3-2.el8, python3-lxml 4.2.3-2.el8, babel 2.5.1-9.module+el8.1.0+3111+de3f2d8e, pytz 2019.3-3.module+el8.4.0+8888+89bc7e79, scipy 1.3.1-4.module+el8.4.0+8888+89bc7e79, babel 2.7.0-10.module+el8.4.0+8888+89bc7e79, +150 more
    fixed: vendor fix RHSA-2021:1761
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more
    fixed: vendor fix RHSA-2021:3254
  • Red Hat Enterprise Linux 9 python-lxml, python3-lxml
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
10 mo ago

Exploit prediction

3.98% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1901633 referenced PoC, tagged "exploit" by a source, unverified
  • advisory.checkmarx.net https://advisory.checkmarx.net/advisory/CX-2020-4286 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CISA ADP 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CNA 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
GitHub 3.1 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
pypi lxml
<4.6.2
>=1.2, <4.6.2
4.6.2

Affected products

  • n/a python-lxml

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.