CVE-2020-28493 Regular Expression Denial of Service (ReDoS)
Attackers can cause denial of service in applications using Jinja2 by exploiting a regular expression vulnerability in the urlize filter.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-28493?
CVE-2020-28493 is a medium-severity denial of service vulnerability in Fedoraproject Fedora, published on 1 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This affects the package jinja2 from 0.0.0 and before 2.11.3. The ReDoS vulnerability is mainly due to the `_punctuation_re regex` operator and its use of multiple wildcards. The last wildcard is the most exploitable as it searches for trailing punctuation. This issue can be mitigated by Markdown to format user content instead of the urlize filter, or by implementing request timeouts and limiting process memory.
Weakness: CWE-400
Which versions are affected by CVE-2020-28493?
3 open source packages ship an affected version, including jinja2 and Jinja2. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
jinja2 PyPI | All versions | 2.11.3 |
jinja2 PyPI | All versions | 2.11.3 |
Jinja2 PyPI | All versions | 2.11.3 |
Linux distribution packages (32)
python3-jinja2 AlmaLinux:8 | All versions | 2.10.1-3.el8 |
python-jinja2 Red Hat:enterprise_linux:8::appstream | All versions | 0:2.10.1-3.el8 |
python3-jinja2 Red Hat:enterprise_linux:8::appstream | All versions | 0:2.10.1-3.el8 |
python-jinja2 Rocky Linux:8 | All versions | 0:2.10.1-3.el8 |
python-Jinja2 SUSE:Enterprise Storage 6 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:HPE Helion OpenStack 8 | All versions | 2.9.6-3.6.1 |
python-Jinja2 SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Module for Advanced Systems Management 12 | All versions | 2.8-19.23.1 |
python-Jinja2 SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 2.8-19.23.1 |
python-Jinja2 SUSE:Linux Enterprise Module for Python 2 15 SP2 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Point of Sale 12 SP2 | All versions | 2.8-22.11.1 |
python-Jinja2 SUSE:Linux Enterprise Server 11 SP3-CLIENT-TOOLS | All versions | 2.6-2.19.5.1 |
python-Jinja2 SUSE:Linux Enterprise Server 11 SP4-CLIENT-TOOLS | All versions | 2.6-2.19.5.1 |
python-Jinja2 SUSE:Linux Enterprise Server 11-PUBCLOUD | All versions | 2.6-2.19.5.1 |
python-Jinja2 SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Server 15-LTSS | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Manager Client Tools 12 | All versions | 2.8-19.23.1 |
python-Jinja2 SUSE:Manager Proxy 4.0 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Manager Retail Branch Server 4.0 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:Manager Server 4.0 | All versions | 2.10.1-3.10.2 |
python-Jinja2 SUSE:OpenStack Cloud 7 | All versions | 2.8-22.11.1 |
python-Jinja2 SUSE:OpenStack Cloud 8 | All versions | 2.9.6-3.6.1 |
python-Jinja2 SUSE:OpenStack Cloud 9 | All versions | 2.10.1-3.6.1 |
python-Jinja2 SUSE:OpenStack Cloud Crowbar 8 | All versions | 2.9.6-3.6.1 |
python-Jinja2 SUSE:OpenStack Cloud Crowbar 9 | All versions | 2.10.1-3.6.1 |
Products include Fedoraproject Fedora, Palletsprojects Jinja.
How do I fix CVE-2020-28493?
Upgrade jinja2 to 2.11.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2020-28493 being exploited?
There is no known exploitation of CVE-2020-28493 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALPINE-CVE-2020-28493, ALSA-2021:4161, AZL-40857, AZL-75813, DEBIAN-CVE-2020-28493, GHSA-g3rq-g295-4j3m and 14 more.