CVE-2019-17626
Critical · 9.8CVSS
9.8
EPSS
10.2%
Published
Oct 16, 2019
CISA due date
—
Cloudanix analysis
A library used to create PDF files can let attackers run their own commands on a server simply by sending a specially made document, which could let them steal information or take over the system.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Remote code execution via unsanitized eval() call inside toColor() when parsing user-supplied color strings from XML attributes.
Why it matters to the business
Servers that render untrusted XML or PDF documents can be fully compromised by attackers executing arbitrary Python code, potentially leading to data theft or service disruption.
How an attack unfolds
An attacker supplies a crafted XML document containing a <span color=" attribute whose value begins with a Python expression; the library passes the value directly to eval() inside colors.py, executing the attacker-controlled code with the privileges of the ReportLab process.
How to fix it
Upgrade ReportLab to a version newer than 3.5.26 that removes the eval() call; if an upgrade is not immediately possible, sanitize or reject all XML color attributes before they reach the library.
How to confirm the fix worked
Confirm the installed ReportLab version exceeds 3.5.26 and test that a sample payload containing a color attribute with Python syntax is rejected or safely handled without execution.
Typical attack path
- Locate an application endpoint that accepts XML input processed by ReportLab
- Craft an XML payload embedding arbitrary Python statements inside a color attribute value
- Submit the payload to trigger toColor(eval(arg))
- Achieve code execution and establish persistence or exfiltrate data
How to detect it
Search application and web-server logs for XML fragments containing color attributes that include parentheses, import statements, or other Python syntax; review any ReportLab error or debug logs that reference toColor or colors.py around the time of suspicious requests.
- <span color="
- toColor(eval(
- from colors import toColor
What your security team should do
- Immediately inventory all ReportLab deployments and block processing of untrusted XML until patched
- Apply the latest ReportLab release that eliminates the eval usage
- Add input validation rules to strip or reject color attributes containing parentheses or Python keywords
- Monitor for any exploitation attempts using the known XML pattern while patches are applied
The record
ReportLab through 3.5.26 allows remote code execution because of toColor(eval(arg)) in colors.py, as demonstrated by a crafted XML document with '<span color="' followed by arbitrary Python code.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | reportlab | 0 | 3.5.28 |
| Debian:10 | python-reportlab | 0 | 3.5.13-1+deb10u1 |
| Debian:11 | python-reportlab | 0 | 3.5.34-1 |
| Debian:12 | python-reportlab | 0 | 3.5.34-1 |
| Debian:13 | python-reportlab | 0 | 3.5.34-1 |
| Debian:14 | python-reportlab | 0 | 3.5.34-1 |
| Debian:8 | python-reportlab | 0 | 3.1.8-3+deb8u2 |
| Debian:9 | python-reportlab | 0 | 3.3.0-2+deb9u1 |
| Mageia:7 | python-reportlab | 0 | 3.5.34-1.mga7 |
| Red Hat:enterprise_linux:6::client | python-reportlab | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::client | python-reportlab-debuginfo | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::client | python-reportlab-docs | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::server | python-reportlab | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::server | python-reportlab-debuginfo | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::server | python-reportlab-docs | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::workstation | python-reportlab | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::workstation | python-reportlab-debuginfo | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:6::workstation | python-reportlab-docs | 0 | 0:2.3-3.el6_10.1 |
| Red Hat:enterprise_linux:7::client | python-reportlab | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::client | python-reportlab-debuginfo | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::client | python-reportlab-docs | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::server | python-reportlab | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::server | python-reportlab-debuginfo | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::server | python-reportlab-docs | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::workstation | python-reportlab | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::workstation | python-reportlab-debuginfo | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:7::workstation | python-reportlab-docs | 0 | 0:2.5-9.el7_7.1 |
| Red Hat:enterprise_linux:8::appstream | python-reportlab | 0 | 0:3.4.0-6.el8_1.2 |
| Red Hat:enterprise_linux:8::appstream | python-reportlab-debugsource | 0 | 0:3.4.0-6.el8_1.2 |
| Red Hat:enterprise_linux:8::appstream | python3-reportlab | 0 | 0:3.4.0-6.el8_1.2 |
| Red Hat:enterprise_linux:8::appstream | python3-reportlab-debuginfo | 0 | 0:3.4.0-6.el8_1.2 |
| Red Hat:rhel_e4s:8.0::appstream | python-reportlab | 0 | 0:3.4.0-6.el8_0.2 |
| Red Hat:rhel_e4s:8.0::appstream | python-reportlab-debugsource | 0 | 0:3.4.0-6.el8_0.2 |
| Red Hat:rhel_e4s:8.0::appstream | python3-reportlab | 0 | 0:3.4.0-6.el8_0.2 |
| Red Hat:rhel_e4s:8.0::appstream | python3-reportlab-debuginfo | 0 | 0:3.4.0-6.el8_0.2 |
| SUSE:Linux Enterprise Workstation Extension 12 SP4 | python-reportlab | 0 | 2.7-3.3.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP5 | python-reportlab | 0 | 2.7-3.3.1 |
| Ubuntu:16.04:LTS | python-reportlab | 0 | 3.3.0-1ubuntu0.1 |
| Ubuntu:18.04:LTS | python-reportlab | 0 | 3.4.0-3ubuntu0.1 |
| openSUSE:Leap 15.1 | python-reportlab | 0 | 3.4.0-lp151.3.3.1 |
| openSUSE:Tumbleweed | python-reportlab | 0 | 4.0.7-1.3 |
Related vulnerabilities
- CVE-2023-33733 Reportlab up to v3.6.12 allows attackers to execute arbitrary code via supplying a… Also affects reportlab
- CVE-2026-2310 IBM webMethods Integration Server 11.1 IBM webMethods Integration is vulnerable to an XML… CWE-91
- CVE-2026-83617 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91
- CVE-2026-83616 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91
- CVE-2026-83618 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91
- CVE-2026-83608 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91
- CVE-2026-83605 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91
- CVE-2026-83607 xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and… CWE-91