CVE-2020-28493
Regular Expression Denial of Service (ReDoS)
Also known as GHSA-g3rq-g295-4j3m, PYSEC-2021-66, SNYK-PYTHON-JINJA2-1012994
Mitigation
- Upgrade jinja2 to 2.11.3 or later.
Who should check
- Projects that depend on PyPI package jinja2 (< 2.11.3)
- Anyone running jinja2 >= 0.0.0, < unspecified; >= unspecified, < 2.11.3
Vulnerability facts
- Affected
- jinja2 < 2.11.3
- Fixed in
- 2.11.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:POpen in CVSS calculator
Show all 9 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- E: P
- EPSS
- 3.59% chance of exploitation in 30 days (percentile 90, 2026-11-26)
- CWE
- CWE-400
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI jinja2 | < 2.11.3 | 2.11.3 | osv |
| jinja2 | >= 0.0.0, < unspecified; >= unspecified, < 2.11.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-28493. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-28493.md Affected: jinja2 < 2.11.3 Fixed in: 2.11.3 Steps: 1. Search this machine and project for jinja2 (PyPI), jinja2: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Exploits and PoCs
Other
- https://github.com/pallets/jinja/blob/ab81fd9c277900c85da0c322a2ff9d68a235b2e6/src/jinja2/utils.py%23L20
- https://github.com/pallets/jinja
- https://github.com/pypa/advisory-database/tree/main/vulns/jinja2/PYSEC-2021-66.yaml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4/
FAQ
Is CVE-2020-28493 being exploited?
There is no confirmed exploitation: CVE-2020-28493 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 3.59% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-28493?
Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2020-28493?
jinja2 < 2.11.3.
Is there a fix for CVE-2020-28493?
Yes. Fixed in 2.11.3. Upgrade jinja2 to 2.11.3 or later.
How do I check if I'm affected by CVE-2020-28493?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.