Skip to content

Regular Expression Denial of Service (ReDoS) in Jinja2

Moderate severity GitHub Reviewed Published Mar 19, 2021 to the GitHub Advisory Database • Updated Sep 7, 2023

Package

pip jinja2 (pip)

Affected versions

< 2.11.3

Patched versions

2.11.3

Description

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.

References

Published by the National Vulnerability Database Feb 1, 2021
Reviewed Mar 13, 2021
Published to the GitHub Advisory Database Mar 19, 2021
Last updated Sep 7, 2023

Severity

Moderate
5.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Weaknesses

CVE ID

CVE-2020-28493

GHSA ID

GHSA-g3rq-g295-4j3m

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.