Remote code execution in ReportLab



Published: 2019-10-16 | Updated: 2020-01-27
Risk High
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2019-17626
CWE-ID CWE-91
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
ReportLab
Client/Desktop applications / Office applications

Vendor ReportLab, Inc.

Security Bulletin

This security bulletin contains one high risk vulnerability.

1) XML injection

EUVDB-ID: #VU24685

Risk: High

CVSSv3.1: 8.8 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: CVE-2019-17626

CWE-ID: CWE-91 - XML Injection

Exploit availability: No

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>

Mitigation

Install updates from vendor's website.

Vulnerable software versions

ReportLab: 1.20 - 3.5.26


CPE2.3 External links

http://access.redhat.com/errata/RHSA-2020:0195
http://access.redhat.com/errata/RHSA-2020:0197
http://bitbucket.org/rptlab/reportlab/issues/199/eval-in-colorspy-leads-to-remote-code
http://bitbucket.org/rptlab/reportlab/src/default/CHANGES.md
http://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZZPHP2BJSTP4IYCSJRQINP763IHO6ASL/

Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

How the attacker can exploit this vulnerability?

The attacker would have to trick the victim to visit a specially crafted website or open a file.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.



###SIDEBAR###