The vulnerability exists in the nx.npmVersion function within src/index.js. The function constructs a shell command using the execSync function from Node.js's child_process module. The inName parameter, which is expected to be an NPM package name, is directly concatenated into the command string without any sanitization or validation. This allows an attacker to inject arbitrary shell commands by crafting a malicious package name string, such as 'some-package && malicious-command #'. When nx.npmVersion is called with this input, the injected command (malicious-command) will be executed on the system with the privileges of the running Node.js process. The vulnerable line of code is var buf = execSync('npm show ' + inName + ' version');.