@greenlake/common-context@3.0.0
Malicious code in @greenlake/common-context (npm)
Analysis
@greenlake/common-context@3.0.0 is a dependency-confusion implant aimed at the private @greenlake scope. Its package.json declares "postinstall": "node beacon.cjs", so the payload runs automatically on install. beacon.cjs POSTs a JSON body to the hardcoded endpoint hxxp://185[.]158[.]107[.]175:8787/_ah/dc with an X-Beacon-Package header; the body reports the package name, os.hostname(), the install directory (__dirname), process.cwd(), the Node/npm version string and the URL protocol, which lets the operator confirm which internal build machine resolved the squatted name. index.js re-fires the same beacon when the module is imported and exports a no-op Proxy so that a build importing the name completes instead of crashing. The package ships a README claiming it is an authorized dependency-confusion test; the same beacon.cjs and index.js are shipped under the sibling names @greenlake/auth, @greenlake/session, @greenlake/mfe-login-url and @greenlake/context-pane, all reporting to the same 185[.]158[.]107[.]175:8787 endpoint. No credential or file-content exfiltration is present in this version's code.
- analyzed by
- Leitwacht
- first seen
- Oct 26, 2026, 12:37 AM
- analyzed
- Oct 26, 2026, 12:41 AM
Related advisories
- @greenlake/session@3.0.0
- @greenlake/session@2.0.0
- birch-css-utils@1.3.0
- pdf2epub@0.1.9
- pdf2epub@0.1.12
- pdf2epub@0.1.10
- mocha-ui-themes@1.0.0
- item-validates@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.