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.0: 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/E:P/U:Amber
CVE-ID: CVE-2019-17626
CWE-ID: CWE-91
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: ReportLab, Inc.
Affected software:
ReportLab

Detailed vulnerability description

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>

How to mitigate CVE-2019-17626

Install updates from vendor's website.

Sources