XML injection in ReportLab - CVE-2019-17626

 

XML injection in ReportLab - CVE-2019-17626

Published: January 27, 2020


Vulnerability identifier: #VU24685
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-17626
CWE-ID: CWE-91
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to the affected software does not properly handle user-supplied XML files within the "toColor(eval(arg))" in colors.py. A remote unauthenticated attacker can execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.

PoC:

<myroot>
    <label>hello-world</label>
    <row1>
            <html>
                <span color="open('/tmp/colors_poc.txt','wb').write('hello world!')">abcdef</span>
            </html>
    </row1>
</myroot>

Affected software

ReportLab
Gentoo Linux
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux for IBM z Systems
Anolis OS
Red Hat Enterprise Linux for x86_64
Opensuse
openEuler
Fedora
python-reportlab (Debian package)
python-reportlab (Ubuntu package)
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
python-reportlab
python-reportlab-docs
python3-reportlab
python-reportlab-doc
python-reportlab-debuginfo
python-reportlab-debugsource
python-reportlab-help

How to mitigate CVE-2019-17626

Install updates from vendor's website.

ReportLab - update to 3.5.34
python-reportlab (Debian package) - addressed in versions 3.3.0-2+deb9u1, 3.5.13-1+deb10u1
python-reportlab (Ubuntu package) - addressed in versions 3.3.0-1ubuntu0.1, 3.4.0-3ubuntu0.1, 3.5.23-1ubuntu0.1
python-reportlab - update to 2.5-11
python-reportlab-docs - update to 2.5-11
python3-reportlab - update to 3.4.0-8.0.1
python-reportlab-doc - update to 3.4.0-8.0.1
python-reportlab - update to 3.4.0-13
python-reportlab-debuginfo - update to 3.4.0-13
python3-reportlab - update to 3.4.0-13
python-reportlab-debugsource - update to 3.4.0-13
python-reportlab-help - update to 3.4.0-13
python-reportlab - addressed in versions 3.5.34-2.fc30, 3.5.34-2.fc31

External References

Related Security Bulletins