5.3medium
Regular Expression Denial of Service (ReDoS)
- Severity
- 5.3medium CVSS:3.1 by snyk
- Exploit likelihood
- 3.59% (higher than 89% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-g3rq-g295-4j3mPYSEC-2021-66SNYK-PYTHON-JINJA2-1012994
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
| Product or package | Versions | Reported by |
|---|---|---|
| jinja2 | from 0.0.0 before unspecified, from unspecified before 2.11.3 | CVE List |
| jinja2 (PyPI) | before 2.11.3 | GitHub Advisory Database, PyPA Advisory Database |
| palletsprojects jinja | before 2.11.3 | NVD |
| fedoraproject fedora | 33 | NVD |
All scores
| snyk | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
Esto afecta al paquete jinja2 desde versiones 0.0.0 y anteriores a 2.11.3. La vulnerabilidad ReDoS se debe principalmente al operador `_punctuation_re regex` y su uso de múltiples comodines. El último comodín es el más explotable, ya que busca la puntuación final. Este problema puede ser mitigado con Markdown para formatear el contenido del usuario en lugar del filtro urlize, o implementando tiempos de espera de las peticiones y limitando la memoria del proceso
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-28493 changed 2024-09-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-g3rq-g295-4j3m changed 2025-02-14 | CC-BY-4.0 |
| NVD | CVE-2020-28493 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-66 changed 2023-11-08 | CC-BY-4.0 |