minimist is vulnerable to prototype pollution. An attacker can inject properties into existing construct prototypes via the setKey
function in the index.js
and modify attributes such as __proto__
, constructor
, and prototype
.
github.com/advisories/GHSA-xvch-5gv4-984h
github.com/Marynk/JavaScript-vulnerability-detection/blob/main/minimist%20PoC.zip
github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d
github.com/substack/minimist/blob/master/index.js#L69
github.com/substack/minimist/issues/164
stackoverflow.com/questions/8588563/adding-custom-properties-to-a-function/20278068#20278068