CVE Vulnerabilities

CVE-2019-19450

XML Injection (aka Blind XPath Injection)

Published: Sep 20, 2023 | Modified: Apr 28, 2024
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
9.8 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

paraparser in ReportLab before 3.5.31 allows remote code execution because start_unichar in paraparser.py evaluates untrusted user input in a unichar element in a crafted XML document with <unichar code= followed by arbitrary Python code, a similar issue to CVE-2019-17626.

Weakness

The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.

Affected Software

Name Vendor Start Version End Version
Reportlab Reportlab * 3.5.31 (excluding)
Red Hat Enterprise Linux 7 RedHat python-reportlab-0:2.5-11.el7_9 *
Red Hat Enterprise Linux 8 RedHat python-reportlab-0:3.4.0-8.el8_8.1 *
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions RedHat python-reportlab-0:3.4.0-6.el8_1.5 *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat python-reportlab-0:3.4.0-8.el8_2.1 *
Red Hat Enterprise Linux 8.2 Telecommunications Update Service RedHat python-reportlab-0:3.4.0-8.el8_2.1 *
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions RedHat python-reportlab-0:3.4.0-8.el8_2.1 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat python-reportlab-0:3.4.0-8.el8_4.1 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat python-reportlab-0:3.4.0-8.el8_4.1 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat python-reportlab-0:3.4.0-8.el8_4.1 *
Red Hat Enterprise Linux 8.6 Extended Update Support RedHat python-reportlab-0:3.4.0-8.el8_6.1 *
Python-reportlab Ubuntu bionic *
Python-reportlab Ubuntu trusty *
Python-reportlab Ubuntu upstream *
Python-reportlab Ubuntu xenial *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References