optimizer-plugin-inc 0.0.1-security.2 → 99.99.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of optimizer-plugin-inc might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +2 -4
  2. package/index.js +13 -0
  3. package/package.json +17 -3
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # Security holding package
1
+ ## A PoC package to prove this package has been taken over
2
2
 
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
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": "0.0.1-security.2",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
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
  }