Repo demonstrating CVE-2021-43616 / https://github.com/npm/cli/issues/2701Repo demonstrating CVE-2021-43616 / https://github.com/npm/cli/issues/2701
Remove the `node_modules` folder and run `npx npm@8 ci`, you can see how
npm will install version 2.2.x (2.2.16 at the time of this commit) even though
package-lock.json requires 2.0.0
```
cat node_modules/shortid/package.json
```
I've commited the `node_modules` from the original install so the issue is obvious
after running `npm ci`
[4.0K] /data/pocs/12f8fe17f3d71bf9b41a8331c73a000097f3ebc5
├── [4.0K] node_modules
│ └── [4.0K] shortid
│ ├── [4.0K] examples
│ │ └── [ 121] examples.js
│ ├── [4.0K] lib
│ │ ├── [2.0K] alphabet.js
│ │ ├── [ 389] encode.js
│ │ └── [ 417] random.js
│ ├── [1.6K] LICENSE
│ ├── [ 916] package.json
│ ├── [4.1K] README.md
│ ├── [2.7K] shortid.js
│ └── [4.0K] test
│ ├── [2.4K] alphabet.test.js
│ ├── [ 723] random.test.js
│ └── [1.1K] shortid.test.js
├── [ 52] package.json
├── [ 622] package-lock.json
└── [ 415] README.md
5 directories, 14 files