CyberSecBulletin
CVE-2024-22017NVD status: Deferred

Node: Execution with Unnecessary Privileges

CVE-2024-22017 is a high-severity execution with unnecessary privileges vulnerability in Node from Node.js, with a CVSS 3.0 base score of 7.3 out of 10. It can be exploited with local access to the system by an attacker with administrator privileges, without any action from a user. The record lists versions 4.*, 5.*, 6.* as the first without the flaw, so updating Node to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.89% chance of exploitation within 30 days, higher than 60% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Node to 4.* or 5.* or 6.* or 7.*, whichever matches your release line, or a later version.
  2. Update nodejs to 18.18.0 or 20.4.0 or 21.6.1, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
Node.jsNode4.0 up to, but not including, 4.*; 5.0 up to, but not including, 5.*; 6.0 up to, but not including, 6.*; 7.0 up to, but not including, 7.*; 8.0 up to, but not including, 8.*; 9.0 up to, but not including, 9.*; 10.0 up to, but not including, 10.*; 11.0 up to, but not including, 11.*; and 9 more ranges4.*, 5.*, 6.*, 7.*, 8.*, 9.*
Node.jsnodejs18.0.0 up to, but not including, 18.18.0; 20.0.0 up to, but not including, 20.4.0; 21.0.0 up to, but not including, 21.6.118.18.0, 20.4.0, 21.6.1

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
HighAdministrator-level access is required first.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
LowSome restricted data can be read.
Integrity
HighData or code can be modified at will.
Availability
LowPerformance or availability is reduced.

Vector: CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:H/A:L. Scored by CNA (hackerone.com).

Official description

setuid() does not affect libuv's internal io_uring operations if initialized before the call to setuid(). This allows the process to perform privileged operations despite presumably having dropped such privileges through a call to setuid(). This vulnerability affects all users using version greater or equal than Node.js 18.18.0, Node.js 20.4.0 and Node.js 21.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Execution with Unnecessary Privileges

The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.

How developers prevent this class of flaw

  • Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
  • Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.
  • Identify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators.

More Execution with Unnecessary Privileges vulnerabilities (CWE-250)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in Node

All Node vulnerabilities

Recent Execution with Unnecessary Privileges vulnerabilities

Spotted an error? Tell us.