CVE-2020-28493: Regular Expression Denial of Service (ReDoS)

Published Feb 1, 2021
·
Updated

A flaw was found in python-jinja2. The ReDOS vulnerability of the regex is mainly due to the sub-pattern [a-zA-Z0-9.-]+.[a-zA-Z0-9.-]+. 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.

Other sources

Regular Expression Denial of Service (ReDoS)

Microsoft

This affects the package jinja2 from 0.0.0 and before 2.11.3. The ReDoS vulnerability is mainly due to the punctuationre 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.

Ubuntu

This affects the package jinja2 from 0.0.0 and before 2.11.3. The ReDOS vulnerability of the regex is mainly due to the sub-pattern [a-zA-Z0-9.-]+.[a-zA-Z0-9.-]+ 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.

GitHub

Affected Software

25 affected componentsFixes available
redhat/python-jinja2<0:2.10.1-3.el8
0:2.10.1-3.el8
redhat/python27-babel<0:0.9.6-10.el7
0:0.9.6-10.el7
redhat/python27-python<0:2.7.18-3.el7
0:2.7.18-3.el7
redhat/python27-python-jinja2<0:2.6-16.el7
0:2.6-16.el7
redhat/python27-python-pygments<0:1.5-5.el7
0:1.5-5.el7
redhat/rh-python38-babel<0:2.7.0-12.el7
0:2.7.0-12.el7
redhat/rh-python38-python<0:3.8.11-2.el7
0:3.8.11-2.el7
redhat/rh-python38-python-cryptography<0:2.8-5.el7
0:2.8-5.el7
redhat/rh-python38-python-jinja2<0:2.10.3-6.el7
0:2.10.3-6.el7
redhat/rh-python38-python-lxml<0:4.4.1-7.el7
0:4.4.1-7.el7
redhat/rh-python38-python-pip<0:19.3.1-2.el7
0:19.3.1-2.el7
redhat/rh-python38-python-urllib3<0:1.25.7-7.el7
0:1.25.7-7.el7
redhat/jinja2<2.11.3
2.11.3
debian/jinja2<=2.10-2, <=2.10-2+deb10u1
2.11.3-13.1.2-13.1.3-1
ubuntu/jinja2<2.10-1ubuntu0.18.04.1+
2.10-1ubuntu0.18.04.1+
ubuntu/jinja2<2.10.1-2ubuntu0.2
2.10.1-2ubuntu0.2
ubuntu/jinja2<2.7.2-2ubuntu0.1~
2.7.2-2ubuntu0.1~
ubuntu/jinja2<2.11.3
2.11.3
ubuntu/jinja2<2.8-1ubuntu0.1+
2.8-1ubuntu0.1+
pip/jinja2<2.11.3
2.11.3
palletsprojects Jinja<2.11.3
Fedoraproject Fedora=33
Microsoft azl3 nodejs 20.14.0-1
Microsoft cm1 python-jinja2 2.11.3-1
Microsoft azl3 nodejs 20.14.0-8

Remediation

Information

If using the jinja2 library as a developer, this flaw can be mitigated by not using the vulnerable urlize() filter, and instead, using Markdown to format user content.

Event History

Feb 1, 2021
CVE Published
12:00 AM
CVE Published
via MITRE·07:30 PM
Data Sourced
via MITRE·07:30 PM
DescriptionSeverityWeakness
Mar 19, 2021
Advisory Published
09:28 PM
Jan 25, 2024
Data Sourced
via Launchpad·05:39 PM
Description

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2020-28493?

CVE-2020-28493 is a vulnerability in the Python Jinja2 package that allows for ReDoS attacks due to the use of multiple wildcards in the regex operator.

2

What is the severity of CVE-2020-28493?

CVE-2020-28493 has a severity rating of high with a score of 7.

3

How does CVE-2020-28493 affect the python-jinja2 package?

CVE-2020-28493 affects the python-jinja2 package versions 0.0.0 to 2.11.3.

4

What is the risk of CVE-2020-28493?

CVE-2020-28493 poses a risk of denial of service attacks through ReDoS vulnerabilities.

5

How can I mitigate CVE-2020-28493?

You can mitigate CVE-2020-28493 by updating the python-jinja2 package to version 2.11.3 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203