Node.js ReDoS Vulnerability
This content has been archived
This article no longer conforms to NHS Digital's standards for cyber alerts, and may contain outdated or inaccurate information. Use of this information contained in this page is at your own risk
Summary
Threat details
The vulnerabilities lie in how Node.js-based applications accept regexes. If the application library is not designed to handle various edge cases then the inputted regex can cause the application to freeze whilst the server attempts to analyse it. As most JavaScript servers use a single-thread execution model, where every request is handled by the same thread, this can cause the entire server to hang or crash.
A ReDoS attack exploits the fact that most regex implementations can be forced into extreme computational situations that cause them to work very slowly. Malicious regexes can be queued so even if a device outputs one regex it will immediately be forced into computing another.
For further information
- Assessing the security of Node.js platform research paper (Ojamaa & Duuna, 2012)
- The Case of the Poisoned Event Handler: Weaknesses in the Node.js Event-Driven Architecture research paper (Davis et al, 2017)
- Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers research paper (Staicu & Pradel, 2018)
Remediation steps
| Type | Step |
|---|---|
|
Fixes for the affected modules can be found here. Users and administrators are advised to apply these updates immediately. |
Last edited: 17 February 2020 12:50 pm