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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **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:P`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 3.59% (percentile 90, 2026-11-26)
- **CWE:** CWE-400
- **Aliases:** GHSA-g3rq-g295-4j3m, PYSEC-2021-66, SNYK-PYTHON-JINJA2-1012994
- **Published:** 2021-02-01T19:30:16.601Z
- **Modified:** 2026-06-17T03:10:32.070Z

## Who should check

- Projects that depend on PyPI package jinja2 (\< 2.11.3)
- Anyone running jinja2 \>= 0.0.0, \< unspecified; \>= unspecified, \< 2.11.3

## 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

- PyPI `jinja2`: affected \< 2.11.3; fixed 2.11.3 (osv)
- jinja2: \>= 0.0.0, \< unspecified; \>= unspecified, \< 2.11.3 (cvelist)

## Mitigation

- Upgrade jinja2 to 2.11.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4/>
- vendor: <https://security.gentoo.org/glsa/202107-19>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2020-28493>
- vendor: <https://github.com/advisories/GHSA-g3rq-g295-4j3m>
- patch: <https://github.com/pallets/jinja/pull/1343>
- patch: <https://github.com/pallets/jinja/commit/15ef8f09b659f9100610583938005a7a10472d4d>
- exploit: <https://snyk.io/vuln/SNYK-PYTHON-JINJA2-1012994>
- other: <https://github.com/pallets/jinja/blob/ab81fd9c277900c85da0c322a2ff9d68a235b2e6/src/jinja2/utils.py%23L20>
- other: <https://github.com/pallets/jinja>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/jinja2/PYSEC-2021-66.yaml>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4/>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-28493>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-g3rq-g295-4j3m> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2021-66> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-28493> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-28493>
