MidnightBSD

Advisories for lxml

CVE-2014-3146 MEDIUM

Incomplete blacklist vulnerability in the lxml.html.clean module in lxml before 3.3.5 allows remote attackers to conduct cross-site scripting (XSS) attacks via control characters in the link scheme to the clean_html function.

CVSS 2.0

Severity: MEDIUM

Problem Type: NVD-CWE-Other,CWE-79,

Products Affected

Vendor Product Version
lxml lxml 2.1.3
lxml lxml 2.2.5
lxml lxml 2.3.4
lxml lxml 1.3.5
lxml lxml 3.2.0
lxml lxml 1.3.3
lxml lxml 1.0
lxml lxml 3.2.3
lxml lxml 1.0.1
lxml lxml 1.1
lxml lxml 1.1.2
lxml lxml 1.3.6
lxml lxml 2.3.3
lxml lxml 2.0.9
lxml lxml 2.1.2
lxml lxml 2.0.4
lxml lxml 0.5.1
lxml lxml 1.3
lxml lxml 1.2.1
lxml lxml 3.0
lxml lxml 2.0.2
lxml lxml 2.2.2
lxml lxml 3.2.1
lxml lxml 1.3.1
lxml lxml 1.3.2
lxml lxml 2.2.4
lxml lxml 2.3.1
lxml lxml 3.2.5
lxml lxml 3.1.2
lxml lxml 0.6
lxml lxml 3.2.2
lxml lxml 1.2
lxml lxml 0.7
lxml lxml 0.9
lxml lxml 2.2.3
lxml lxml 2.0.10
lxml lxml 2.2.8
lxml lxml 3.0.1
lxml lxml 2.0.7
lxml lxml 1.0.2
lxml lxml 0.5
lxml lxml 2.1.4
lxml lxml *
lxml lxml 2.0.8
lxml lxml 0.8
lxml lxml 2.3.2
lxml lxml 3.1
lxml lxml 3.3.2
lxml lxml 2.0
lxml lxml 2.0.6
lxml lxml 2.0.5
lxml lxml 3.1.0
lxml lxml 2.3.5
lxml lxml 3.3.1
lxml lxml 0.9.2
lxml lxml 1.3.4
lxml lxml 2.1.1
lxml lxml 2.0.3
lxml lxml 3.0.2
lxml lxml 3.2.4
lxml lxml 2.3.6
lxml lxml 0.9.1
lxml lxml 2.2.7
lxml lxml 2.2
lxml lxml 2.2.1
lxml lxml 1.1.1
lxml lxml 1.0.3
lxml lxml 3.3.3
lxml lxml 2.1
lxml lxml 3.3.0
lxml lxml 1.0.4
lxml lxml 2.3
lxml lxml 3.1.1
lxml lxml 2.0.11
lxml lxml 2.0.1
lxml lxml 2.2.6
CVE-2018-19787 MEDIUM

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.

CVSS 2.0

Severity: MEDIUM

Problem Type: CWE-79,CWE-79,

Products Affected

Vendor Product Version
canonical ubuntu_linux 12.04
canonical ubuntu_linux 18.04
canonical ubuntu_linux 16.04
debian debian_linux 8.0
lxml lxml *
canonical ubuntu_linux 14.04
CVE-2020-27783 MEDIUM

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.

CVSS 3.x

Source Score Severity Vector Exploitability Impact
nvd@nist.gov 6.1 MEDIUM CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N 2.8 2.7

CVSS 2.0

Severity: MEDIUM

Problem Type: CWE-79,CWE-79,

Products Affected

Vendor Product Version
debian debian_linux 9.0
redhat enterprise_linux 8.0
oracle zfs_storage_appliance_kit 8.8
fedoraproject fedora 33
fedoraproject fedora 32
lxml lxml *
redhat software_collections -
oracle communications_offline_mediation_controller 12.0.0.3.0
netapp snapcenter -
debian debian_linux 10.0
CVE-2021-28957 MEDIUM

An XSS vulnerability was discovered in python-lxml's clean module versions before 4.6.3. When disabling the safe_attrs_only and forms arguments, the Cleaner class does not remove the formaction attribute allowing for JS to bypass the sanitizer. A remote attacker could exploit this flaw to run arbitrary JS code on users who interact with incorrectly sanitized HTML. This issue is patched in lxml 4.6.3.

CVSS 2.0

Severity: MEDIUM

Problem Type: CWE-79,CWE-79,

Products Affected

Vendor Product Version
debian debian_linux 9.0
oracle zfs_storage_appliance_kit 8.8
fedoraproject fedora 33
lxml lxml *
netapp snapcenter -
debian debian_linux 10.0
fedoraproject fedora 34
CVE-2021-43818 MEDIUM

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.

CVSS 2.0

Severity: MEDIUM

Problem Type: CWE-74,CWE-79,CWE-79,

Products Affected

Vendor Product Version
fedoraproject fedora 35
debian debian_linux 9.0
oracle http_server 12.2.1.4.0
lxml lxml *
oracle communications_cloud_native_core_network_exposure_function 22.1.1
netapp hci_storage_node_firmware -
netapp solidfire -
fedoraproject fedora 34
oracle communications_cloud_native_core_binding_support_function 22.1.3
debian debian_linux 11.0
oracle communications_cloud_native_core_policy 22.2.0
oracle zfs_storage_appliance_kit 8.8
debian debian_linux 10.0
oracle http_server 12.2.1.3.0
netapp solidfire_enterprise_sds -
CVE-2022-2309 MEDIUM

NULL Pointer Dereference allows attackers to cause a denial of service (or application crash). This only applies when lxml is used together with libxml2 2.9.10 through 2.9.14. libxml2 2.9.9 and earlier are not affected. It allows triggering crashes through forged input data, given a vulnerable code sequence in the application. The vulnerability is caused by the iterwalk function (also used by the canonicalize function). Such code shouldn't be in wide-spread use, given that parsing + iterwalk would usually be replaced with the more efficient iterparse function. However, an XML converter that serialises to C14N would also be vulnerable, for example, and there are legitimate use cases for this code sequence. If untrusted input is received (also remotely) and processed via iterwalk function, a crash can be triggered.

CVSS 3.x

Source Score Severity Vector Exploitability Impact
nvd@nist.gov 7.5 HIGH CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 3.9 3.6

CVSS 2.0

Severity: MEDIUM

Problem Type: CWE-476,

Products Affected

Vendor Product Version
lxml lxml *
fedoraproject fedora 37
fedoraproject fedora 36
CVE-2026-41066

lxml is a library for processing XML and HTML in the Python language. Prior to 6.1.0, using either of the two parsers in the default configuration (with resolve_entities=True) allows untrusted XML input to read local files. Setting the resolve_entities option explicitly to resolve_entities='internal' or resolve_entities=False disables the local file access. This vulnerability is fixed in 6.1.0.

CVSS 3.x

Source Score Severity Vector Exploitability Impact
security-advisories@github.com 7.5 HIGH CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N 3.9 3.6

Products Affected

Vendor Product Version
lxml lxml *