CVE-2024-21892

Privilege Escalation
Affects
Node.js
in
Node.js
No items found.
Versions
4.0 < 18.19.1, 20 < 20.11.1

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It offers a rich library of various JavaScript modules and is widely used in server-side applications.

‍

An Improper Privilege Management vulnerability has been identified in Node.js. The issue stems from a bug in the implementation of privilege exceptions. This weakness allows attackers to inject code that inherits the process's elevated privileges.

‍

This vulnerability affects specific versions of the package and can result in unauthorized access. Details on affected versions and reproduction steps are provided below.

‍

Details

Module Info

  • ‍Affected packages: Node.js‍
  • Affected versions: 4.0 < 18.19.1, 20 < 20.11.1 ‍
  • GitHub repository: https://github.com/nodejs/node‍
  • Published packages: https://github.com/nodejs/node/releases‍
  • Package manager: npm‍
  • Fixed in: Node.js NES version 12, 14, 16

‍

Vulnerability Info

The issue stems from a bug in the implementation of privilege exceptions.

For instance, in a scenario where Node.js is running with elevated privileges, if `CAP_NET_BIND_SERVICE` environment variable is set by an unprivileged user, the system incorrectly applies privilege. This behavior can be exploited by attackers to execute arbitrary code with elevated privileges.

‍

This vulnerability is a result of flawed logic, and may allow attackers to escalate privileges.


- https://www.cve.org/CVERecord?id=CVE-2024-21892

- https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/03-Testing_for_Privilege_Escalation

‍

Mitigation

This vulnerability is not fixed upstream due to the release line being EOL. Herodevs has issued patched builds under the NES (Never Ending Support) line.


- Update to a patched LTS version of Node.js

- Leverage a commercial support partner like HeroDevs for post-EOL security.

Refer to the NES documentation for upgrade instructions.

‍

Credits

  • tniessen
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2024-21892
PROJECT Affected
Node.js
Versions Affected
4.0 < 18.19.1, 20 < 20.11.1
NES Versions Affected
Published date
February 20, 2024
≈ Fix date
March 27, 2025
Category
Privilege Escalation
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Node.js
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.