Regular Expression Denial of Service (ReDoS) in Prism (PrismJS prism)
At a glance
- Source
- NVD
- EPSS
- EPSS 1.42 % · percentile 73 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
Description
Prism is a syntax highlighting library. Some languages before 1.24.0 are vulnerable to Regular Expression Denial of Service (ReDoS). When Prism is used to highlight untrusted (user-given) text, an attacker can craft a string that will take a very very long time to highlight. This problem has been fixed in Prism v1.24. As a workaround, do not use ASCIIDoc or ERB to highlight untrusted text. Other languages are not affected and can be used to highlight untrusted text.
Weaknesses (CWE)
- CWE-400 — Uncontrolled Resource Consumption
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H | GitHub_M |
| CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NVD · nvd@nist.gov (Primary) |
| CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-gj77-59wh-66hg — Regular Expression Denial of Service (ReDoS) in Prism
European references
- ENISA EUVD · EUVD-2021-1326
- GCVE · GCVE-0-2021-32723
CERT-FR advisories
- CERTFR-2022-AVI-050 — Multiples vulnérabilités dans Oracle Database Server · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:prismjs:prism:*:*:*:*:*:node.js:*:*< 1.24.0cpe:2.3:a:oracle:application_express:*:*:*:*:*:*:*:*< 21.1.4
Affected products
| Product | Versions |
|---|---|
| PrismJS · prism | affected < 1.24 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |