CVE-2019-17626 XML Injection in ReportLab

Critical 9.8 Published Updated

Remote attackers can execute arbitrary Python code via crafted XML documents due to unsafe eval usage in ReportLab.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-17626?

CVE-2019-17626 is a critical code injection vulnerability in n/a, published on 16 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-91

Which versions are affected by CVE-2019-17626?

3 open source packages ship an affected version, including reportlab. It affects 1 product.

PackageAffectedFixed in
reportlab PyPIAll versions3.5.28
reportlab PyPIAll versions3.5.28
reportlab PyPIAll versions3.5.28
Linux distribution packages (31)
python-reportlab Red Hat:enterprise_linux:6::clientAll versions0:2.3-3.el6_10.1
python-reportlab-debuginfo Red Hat:enterprise_linux:6::clientAll versions0:2.3-3.el6_10.1
python-reportlab-docs Red Hat:enterprise_linux:6::clientAll versions0:2.3-3.el6_10.1
python-reportlab Red Hat:enterprise_linux:6::serverAll versions0:2.3-3.el6_10.1
python-reportlab-debuginfo Red Hat:enterprise_linux:6::serverAll versions0:2.3-3.el6_10.1
python-reportlab-docs Red Hat:enterprise_linux:6::serverAll versions0:2.3-3.el6_10.1
python-reportlab Red Hat:enterprise_linux:6::workstationAll versions0:2.3-3.el6_10.1
python-reportlab-debuginfo Red Hat:enterprise_linux:6::workstationAll versions0:2.3-3.el6_10.1
python-reportlab-docs Red Hat:enterprise_linux:6::workstationAll versions0:2.3-3.el6_10.1
python-reportlab Red Hat:enterprise_linux:7::clientAll versions0:2.5-9.el7_7.1
python-reportlab-debuginfo Red Hat:enterprise_linux:7::clientAll versions0:2.5-9.el7_7.1
python-reportlab-docs Red Hat:enterprise_linux:7::clientAll versions0:2.5-9.el7_7.1
python-reportlab Red Hat:enterprise_linux:7::serverAll versions0:2.5-9.el7_7.1
python-reportlab-debuginfo Red Hat:enterprise_linux:7::serverAll versions0:2.5-9.el7_7.1
python-reportlab-docs Red Hat:enterprise_linux:7::serverAll versions0:2.5-9.el7_7.1
python-reportlab Red Hat:enterprise_linux:7::workstationAll versions0:2.5-9.el7_7.1
python-reportlab-debuginfo Red Hat:enterprise_linux:7::workstationAll versions0:2.5-9.el7_7.1
python-reportlab-docs Red Hat:enterprise_linux:7::workstationAll versions0:2.5-9.el7_7.1
python-reportlab Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.0-6.el8_1.2
python-reportlab-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.0-6.el8_1.2
python3-reportlab Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.0-6.el8_1.2
python3-reportlab-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.0-6.el8_1.2
python-reportlab Red Hat:rhel_e4s:8.0::appstreamAll versions0:3.4.0-6.el8_0.2
python-reportlab-debugsource Red Hat:rhel_e4s:8.0::appstreamAll versions0:3.4.0-6.el8_0.2
python3-reportlab Red Hat:rhel_e4s:8.0::appstreamAll versions0:3.4.0-6.el8_0.2
python3-reportlab-debuginfo Red Hat:rhel_e4s:8.0::appstreamAll versions0:3.4.0-6.el8_0.2
python-reportlab SUSE:Linux Enterprise Workstation Extension 12 SP4All versions2.7-3.3.1
python-reportlab SUSE:Linux Enterprise Workstation Extension 12 SP5All versions2.7-3.3.1
python-reportlab openSUSE:Leap 15.1All versions3.4.0-lp151.3.3.1
python-reportlab openSUSE:TumbleweedAll versions4.0.7-1.3
python-reportlab openSUSE:TumbleweedAll versions4.5.1-1.2

Products include Reportlab Reportlab.

How do I fix CVE-2019-17626?

Upgrade reportlab to 3.5.28 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2019-17626 being exploited?

There is no known exploitation of CVE-2019-17626 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2019-17626, DLA-2112-1, DSA-4663-1, GHSA-qpg2-vx7j-3869, MGASA-2020-0059, OESA-2021-1281 and 13 more.

Is CVE-2019-17626 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free