CVE-2019-19450: Reportlab Remote Code Execution Vulnerability
CRITICALCVE-2019-19450 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-91: XML Injection (aka Blind XPath Injection)) affecting Reportlab libraries in the PyPI ecosystem. The issue involves reportlab vulnerable to remote code execution via paraparser. Remediation is available by upgrading affected packages to version 3.5.31.
CVE-2019-19450 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2019-19450
To remediate this vulnerability, upgrade all affected Reportlab dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install reportlab>=3.5.31
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show reportlab
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2019-19450, inspect your installed packages using pip:
pip show reportlab
Analyze the terminal output to locate any version of Reportlab in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.31), your application is affected.
Note: The pip show reportlab command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-91: XML Injection (aka Blind XPath Injection), where 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. In Reportlab, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-19450 Affected Reportlab Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
reportlab
|
PyPI |
< 3.5.31
|
3.5.31
|
References
Frequently Asked Questions
What is CVE-2019-19450?
Which Reportlab versions are affected?
What version fixes CVE-2019-19450?
Is reportlab affected?
What is the CVSS score of CVE-2019-19450?
What CWE is associated with CVE-2019-19450?
How can I check PyPI dependencies for CVE-2019-19450?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pj98-2xf6-cff5",
"modified" : "2024-04-28T06:31:24Z",
"published" : "2023-09-20T15:30:51Z",
"aliases" : [ "CVE-2019-19450" ],
"summary" : "ReportLab vulnerable to remote code execution via paraparser",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "reportlab"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.5.31"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-19450"
}, {
"type" : "WEB",
"url" : "https://github.com/MrBitBucket/reportlab-mirror/blob/master/CHANGES.md"
}, {
"type" : "WEB",
"url" : "https://github.com/MrBitBucket/reportlab-mirror/blob/master/CHANGES.md#release-353115102019"
}, {
"type" : "PACKAGE",
"url" : "https://hg.reportlab.com/hg-public/reportlab"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/09/msg00037.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CHMCB2GJQKFMGVO5RWHN222NQL5XYPHZ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HADPTB3SBU7IVRMDK7OL6WSQRU5AFWDZ"
}, {
"type" : "WEB",
"url" : "https://pastebin.com/5MicRrr4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-91" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-21T16:57:08Z",
"nvd_published_at" : "2023-09-20T14:15:12Z"
}
}