Junglewise Threat Intelligence

CVE-2024-21488: network arbitrary command injection in mac_address_for function

CVE-2024-21488 · Severity: low · CVSS 3.1 · Published 2024-01-30

Technologies: Network.

Executive brief

The network npm package is a library used by Node.js applications to retrieve network interface information. Versions before 0.7.0 fail to sanitize user input passed to the mac_address_for function, allowing attackers to inject and execute arbitrary system commands. This could lead to full system compromise if the application processes untrusted input.

Technical details

The vulnerability is a command injection flaw (CWE-77) in the mac_address_for function, which uses the child_process exec function without proper input validation or sanitization. If an attacker supplies specially crafted input to this function, they can break out of the intended command and execute arbitrary shell commands with the privileges of the running Node.js process. The attack requires network access and the ability to provide input to the affected function; no authentication is required. The patch was released in version 0.7.0, which adds input validation for network interface names.

Affected products

  • network before 0.7.0

Timeline

  • 2024-01-30: disclosed
  • 2024-01-30: patched: Version 0.7.0 released with input validation fix

References