CVE-2020-28493: Regular Expression Denial of Service (ReDoS) in Jinja2
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.43241%
CWE
Published
3/19/2021
Updated
9/24/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| jinja2 | pip | < 2.11.3 | 2.11.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
- The vulnerability documentation explicitly mentions the urlize filter as the attack vector.
- The commit diff shows removal of _simple_email_re and _punctuation_re regex patterns in utils.py, which were directly used by the urlize function.
- The patch modifies the email validation regex to a stricter pattern (r'^\S+@\w[\w.-]*.\w+$') and reworks punctuation handling to reduce backtracking.
- Multiple sources (CVE, GHSA, commit message) link the vulnerability to regex inefficiencies in urlize's email matching and punctuation processing logic.