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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PrismJS | prism | < 1.24 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | node-prismjs | No fix yet | — |
| Ubuntu 26.04 LTS | node-prismjs | No fix yet | — |
| Ubuntu 25.10 | node-prismjs | No fix yet | — |
| Ubuntu 24.04 LTS | node-prismjs | No fix yet | — |
| Ubuntu 22.04 LTS | node-prismjs | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | node-prismjs | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | prismjs | < 1.24.0 | 1.24.0 | GHSA-gj77-59wh-66hg |