{"id":"CVE-2021-32723","published":"2021-06-28T19:15:15Z","modified":"2024-08-03T23:33:54Z","title":"Regular Expression Denial of Service (ReDoS) in Prism","vendor":"PrismJS","product":"prism","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01421,"percentile":0.73507,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/PrismJS/prism/security/advisories/GHSA-gj77-59wh-66hg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/PrismJS/prism/pull/2688","tags":["x_refsource_MISC"]},{"url":"https://github.com/PrismJS/prism/pull/2774","tags":["x_refsource_MISC"]},{"url":"https://www.oracle.com/security-alerts/cpujan2022.html","tags":["x_refsource_MISC"]}],"priority":{"score":19.9,"factors":[{"name":"EPSS percentile","points":14.7},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"prismjs","affectedVersions":[{"vendor":"PrismJS","product":"prism","versions":["< 1.24"]}],"affected":[{"ecosystem":"npm","package":"prismjs","vulnerableRanges":["<1.24.0"],"patched":["1.24.0"],"from":["GHSA-gj77-59wh-66hg"],"provenance":"source"}],"summary":{"text":"An attacker can exploit it when Prism is used to highlight untrusted text by submitting a crafted string that takes a very long time to process, and this requires user interaction (the highlighting of that input must be triggered), with no network authentication needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:15:53Z"},"euvd":{"id":"EUVD-2021-1326","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-prismjs-prism-cve-2021-23341","parents":[{"from":"CVE-2021-23341","to":"CVE-2021-32723","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:prismjs","fromFixed":"1.23.0","toFixed":"1.24.0","daysApart":130},{"kind":"same-code","provenance":"machine","files":["components/prism-asciidoc.js","components/prism-asciidoc.min.js"],"commits":["https://github.com/PrismJS/prism/commit/c2f6a64426f44497a675cb32dccb079b3eff1609","https://github.com/PrismJS/prism/commit/d85e30da6755fdbe7f8559f8e75d122297167018"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2020-15138","published":"2020-08-07","fixed":"1.21.0","kev":false},{"cve":"CVE-2021-23341","published":"2021-02-18","fixed":"1.23.0","kev":false},{"cve":"CVE-2021-32723","published":"2021-06-28","fixed":"1.24.0","kev":false},{"cve":"CVE-2021-3801","published":"2021-09-15","fixed":"1.25.0","kev":false,"link":{"from":"CVE-2021-32723","to":"CVE-2021-3801","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:prismjs","fromFixed":"1.24.0","toFixed":"1.25.0","daysApart":79}]}},{"cve":"CVE-2022-23647","published":"2022-02-18","fixed":"1.27.0","kev":false},{"cve":"CVE-2024-53382","published":"2025-03-03","fixed":"1.30.0","kev":false}],"package":"npm:prismjs"}}