Intel

AIKIDO-2026-10163

@nx/workspace is vulnerable to Command Injection

Command Injection Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.

79

High Risk

This Affects:

JS@nx/workspace
16.0.0 - 22.4.4
Fixed in 22.4.5

TL;DR

Affected versions of this package allow OS command injection because user-controlled input flows unsanitized into execSync via string interpolation when resolving npm package versions. An attacker can supply a crafted --preset value containing shell metacharacters to execute arbitrary commands on the host during create-nx-workspace. It can lead to full compromise of the developer machine or CI runner (RCE), including data exfiltration or malware installation. The issue arises from using shell command concatenation instead of validating input and invoking commands with argument arrays.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@nx/workspace is vulnerable to Command Injection in versions 16.0.0 - 22.4.4.

How to fix this

Upgrade the @nx/workspace library to the patch version.

Background Info