ReportLab vulnerable to remote code execution via paraparserGHSA-pj98-2xf6-cff5
CRITICALGHSA-pj98-2xf6-cff5 is a critical-severity (CVSS 9.8) CWE-91 vulnerability in reportlab. A fix is available for reportlab — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
reportlabReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
paraparser in ReportLab before 3.5.31 allows remote code execution because start_unichar in paraparser.py evaluates untrusted user input in a unichar element in a crafted XML document with '<unichar code="' followed by arbitrary Python code, a similar issue to CVE-2019-17626.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | reportlab | all versions | 3.5.31pip install --upgrade 'reportlab==3.5.31' |
Affected Products
debian linuxdebianreportlabreportlabDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for reportlab, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update reportlab to 3.5.31 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-pj98-2xf6-cff5 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
To exploit the issue, a malicious user has to use a crafted malicious html 'unichar' tag input and then use the reportlab's feature to generate a pdf of the document and that can lead to a remote code execution, therefore, this CVE has an Important impact. This vulnerability is similar to CVE-2019-17626.
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-pj98-2xf6-cff5 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 7 | python-reportlab-0:2.5-11.el7_9 | RHSA-2023:5616 |
| Red Hat Enterprise Linux 8 | python-reportlab-0:3.4.0-8.el8_8.1 | RHSA-2023:5790 |
| Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions | python-reportlab-0:3.4.0-6.el8_1.5 | RHSA-2023:5789 |
| Red Hat Enterprise Linux 8.2 Advanced Update Support | python-reportlab-0:3.4.0-8.el8_2.1 | RHSA-2023:5788 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | python-reportlab-0:3.4.0-8.el8_4.1 | RHSA-2023:5787 |
| Red Hat Enterprise Linux 8.6 Extended Update Support | python-reportlab-0:3.4.0-8.el8_6.1 | RHSA-2023:5786 |
Frequently Asked Questions
Is GHSA-pj98-2xf6-cff5 in your dependencies?
Find it across PyPI, including transitive dependencies.