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.
The product does not properly control the allocation and maintenance of a limited resource.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Prism | Prismjs | * | 1.24.0 (excluding) |
Node-prismjs | Ubuntu | devel | * |
Node-prismjs | Ubuntu | esm-apps/focal | * |
Node-prismjs | Ubuntu | esm-apps/jammy | * |
Node-prismjs | Ubuntu | esm-apps/noble | * |
Node-prismjs | Ubuntu | focal | * |
Node-prismjs | Ubuntu | groovy | * |
Node-prismjs | Ubuntu | hirsute | * |
Node-prismjs | Ubuntu | impish | * |
Node-prismjs | Ubuntu | jammy | * |
Node-prismjs | Ubuntu | kinetic | * |
Node-prismjs | Ubuntu | lunar | * |
Node-prismjs | Ubuntu | mantic | * |
Node-prismjs | Ubuntu | noble | * |
Node-prismjs | Ubuntu | oracular | * |
Node-prismjs | Ubuntu | plucky | * |
Node-prismjs | Ubuntu | questing | * |
Node-prismjs | Ubuntu | trusty | * |
Node-prismjs | Ubuntu | upstream | * |
Node-prismjs | Ubuntu | xenial | * |
Mitigation of resource exhaustion attacks requires that the target system either:
The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
The second solution is simply difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.