optimizer-plugin-inc 0.0.1-security.2 → 99.99.99
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of optimizer-plugin-inc might be problematic. Click here for more details.
- package/README.md +2 -4
- package/index.js +13 -0
- package/package.json +17 -3
package/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
1
|
+
## A PoC package to prove this package has been taken over
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=optimizer-plugin-inc for more information.
|
3
|
+
Running `npm i {packagename}` will install the package and output a message to prove RCE
|
package/index.js
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
|
3
|
+
exec("echo Hello $(whoami), thanks for installing me on $(hostname)", (error, stdout, stderr) => {
|
4
|
+
if (error) {
|
5
|
+
console.log(`error: ${error.message}`);
|
6
|
+
return;
|
7
|
+
}
|
8
|
+
if (stderr) {
|
9
|
+
console.log(`stderr: ${stderr}`);
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
console.log(`stdout: ${stdout}`);
|
13
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
{
|
2
2
|
"name": "optimizer-plugin-inc",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "99.99.99",
|
4
|
+
"description": "A PoC package to show that this NPM package has been claimed",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"author": "William Wallace @phyr3wall",
|
11
|
+
"license": "ISC",
|
12
|
+
"repository": {
|
13
|
+
"type": "git",
|
14
|
+
"url": "git+https://github.com/wwallace/npm-takeover.git"
|
15
|
+
},
|
16
|
+
"bugs": {
|
17
|
+
"url": "https://github.com/wwallace/npm-takeover/issues"
|
18
|
+
},
|
19
|
+
"homepage": "https://github.com/wwallace/npm-takeover#readme"
|
6
20
|
}
|