Remote code execution in Node.js batch files



Published: 2024-04-11
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2024-27980
CWE-ID CWE-77
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
Node.js
Server applications / Web servers

Vendor Node.js Foundation

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Command Injection

EUVDB-ID: #VU88462

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-27980

CWE-ID: CWE-77 - Command injection

Exploit availability: No

Description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to improper handling of batch files in child_process.spawn / child_process.spawnSync. An attacker can inject a malicious command line argument and achieve code execution even if the shell option is not enabled.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

Node.js: 18.0.0 - 21.7.2

External links

http://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

How the attacker can exploit this vulnerability?

The attacker would have to send a specially crafted request to the affected application in order to exploit this vulnerability.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###