CVE-2019-17626

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…

Critical · published October 16, 2019

CVSS v3.1
9.8
EPSS
10%
Percentile
95.7
In the wild
Unconfirmed
What it is

🚨 A crafty XML document can unleash malicious code execution in ReportLab, thanks to a sneaky line in colors.py! 🔥 Think of it like a restaurant that serves you a dish, but someone has snuck in a secret ingredient without the chef knowing — that 'ingredient' can be any Python code, and it could wreak havoc! With this vulnerability, an attacker could execute arbitrary Python code on the server, gaining complete control and potentially accessing sensitive data, manipulating files, or even bringing the whole system to its knees. This could lead to catastrophic data breaches or service outages, making it an absolute nightmare for any organization relying on this library!

Put simply

Think of it like a restaurant that serves you a dish, but someone has snuck in a secret ingredient without the chef knowing — that 'ingredient' can be any Python code, and it could wreak havoc! The vulnerability lies in the toColor function of ReportLab's colors.py, which evaluates input directly from crafted XML documents without proper sanitization, allowing execution of arbitrary Python code.

What to do

With this vulnerability, an attacker could execute arbitrary Python code on the server, gaining complete control and potentially accessing sensitive data, manipulating files, or even bringing the whole system to its knees. This could lead to catastrophic data breaches or service outages, making it an absolute nightmare for any organization relying on this library! Immediate action is necessary: upgrade to ReportLab version 3.5.27 or later to patch this security flaw. Additionally, implement stringent input validation to ensure that any XML content processed is safe and free of malicious code. You've got this! By following these steps, you’ll strengthen your defenses in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.10231 · 95.7th percentile
Published
2019-10-16T11:29Z
EPSS history
Timeline
  • 16 OCT 11:29Z
    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…
    cvelistv5