Node.js Security Update: Weak Randomness and HTTP Request Smuggling
Summary
ALSA-2022:6963: Important: nodejs security update. Affects nodejs versions < 1:16.17.1-1.el9_0. Fixed in 1:16.17.1-1.el9_0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Node.js is a software development platform for building fast and scalable network applications in the JavaScript programming language. It provides a runtime environment that allows developers to execute JavaScript code outside of a web browser. Node.js is widely used for server-side and networking applications due to its event-driven architecture and non-blocking I/O model.
Vulnerability Detail
The Node.js security update addresses two important vulnerabilities:
-
Weak Randomness in WebCrypto Keygen (CVE-2022-35255): This vulnerability could allow an attacker to predict cryptographic keys generated by the WebCrypto API due to weak randomness. This could lead to the compromise of sensitive data or unauthorized access to encrypted communications.
-
HTTP Request Smuggling due to Incorrect Parsing of Header Fields (CVE-2022-35256): This vulnerability allows an attacker to manipulate HTTP requests by exploiting a flaw in the parsing of header fields. By sending specially crafted requests, an attacker could bypass security controls, inject malicious content, or perform other unauthorized actions.
How To Fix
Minimum fixed version
1:16.17.1-1.el9_0
This is the first release that contains the fix.
sudo dnf update nodejs
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The Node.js security update addresses two important vulnerabilities related to weak randomness in WebCrypto key generation and incorrect parsing of header fields in HTTP requests. It is crucial to update the Node.js package to version 16.17.1 or later to mitigate the risk of exploitation. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for nodejs →
FAQ
Node.js is a software development platform for building fast and scalable network applications in JavaScript.
The weak randomness vulnerability in Node.js could allow an attacker to predict cryptographic keys, potentially compromising the security of encrypted communications.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by these vulnerabilities. Simply upload your package-lock.json file to the playground and it will alert you in real-time if any open-source vulnerabilities are found.
No, the recommended fix is to update the Node.js package to the latest version.
You can find more information about these vulnerabilities in the CVE pages: CVE-2022-35255 and CVE-2022-35256.
Related vulnerabilities
Recent vulnerabilities recorded for nodejs.