Vulnerability
CVE-2020-28493
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.
34 advisories report this vulnerability, across 12 ecosystems.
Advisories in Red Hat
-
RHSA-2021:3252
Red Hat Security Advisory: python27 security update
-
RHSA-2021:3254
Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update
-
RHSA-2021:4151
Red Hat Security Advisory: python27:2.7 security update
-
RHSA-2021:4161
Red Hat Security Advisory: python-jinja2 security update
-
RHSA-2021:4162
Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update
-
RHVEX-CVE-2020-28493
python-jinja2: ReDoS vulnerability in the urlize filter
References
- https://github.com/pallets/jinja/blob/ab81fd9c277900c85da0c322a2ff9d68a235b2e6/src/jinja2/utils.py%23L20
- https://github.com/pallets/jinja/pull/1343
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PVAKCOO7VBVUBM3Q6CBBTPBFNP5NDXF4/
- https://security.gentoo.org/glsa/202107-19
- https://snyk.io/vuln/SNYK-PYTHON-JINJA2-1012994