{"id":"MAL-2026-5781","summary":"Malicious code in portal-backend (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (c5aca21d0e952f5ba313432cf5d47e41f185d19e65d894a005cce20be90d4985)\nOn `npm install`, the package's `preinstall` hook executes `postinstall.js`, which enumerates `process.env` and filters keys matching a broad credential-shaped regex (key|secret|token|pass|private|ssh|deploy|auth|api|rpc|wallet|sentry|docker|graph|slack|host), then bundles those values together with `os.hostname()`, `os.userInfo().username`, `process.cwd()`, and npm registry config into a JSON payload and POSTs it via `https.request` to `185.130.46.35:8443/collect` — a bare IP with no relation to any publisher domain. The source even self-identifies the behavior in a comment (\"Exfil CI environment variables on install\"). The package itself is hollow: `index.js` is `module.exports = {}`, the description is the generic \"Internal package,\" and the version is `999.0.0` — the canonical dependency-confusion shape designed to outrank a private registry's `portal-backend` and have misconfigured installers fetch this public copy instead. Installing this package on any developer or CI machine immediately ships that machine's CI secrets, deploy tokens, SSH/registry credentials, and host identity to the attacker.\n","aliases":["GHSA-6j4w-8j7h-8c6c"],"modified":"2026-09-01T11:31:41.182014639Z","published":"2026-06-15T15:10:14Z","database_specific":{"malicious-packages-origins":[{"versions":["999.0.0"],"id":"IN-MAL-2026-006489","import_time":"2026-06-15T15:30:22.350801304Z","modified_time":"2026-06-15T15:10:14Z","sha256":"c5aca21d0e952f5ba313432cf5d47e41f185d19e65d894a005cce20be90d4985","source":"amazon-inspector"},{"id":"RLMA-2026-05595","import_time":"2026-07-20T13:14:49.94050802Z","modified_time":"2026-07-20T10:54:12Z","sha256":"6f22858e9c4a95b4d1b87e9f258d6033387301966122aff10734622f0cd847fe","source":"reversing-labs","versions":["999.0.0"]},{"sha256":"0c1ce80d45bec95174ab960e865906f808fd1f2117f2a9476c1293e18e71c1e1","source":"reversing-labs","id":"RLUA-2026-06387","import_time":"2026-09-01T11:18:16.691332434Z","modified_time":"2026-08-24T17:04:30Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/portal-backend/v/999.0.0"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-6j4w-8j7h-8c6c"}],"affected":[{"package":{"name":"portal-backend","ecosystem":"npm","purl":"pkg:npm/portal-backend"},"versions":["999.0.0"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"ef0141f884ed95a226e797d8f117901761bbd2323d0678b0baa842851fcc27485f2cf2","path":"postinstall.js","sha256":"d64656e6553409a54557222ecca0d2d914ac89afab42f95780168653327962f3"},{"path":"package.json","sha256":"47c9924a1947405a624eebfed9286c3acd27dca9a0de2f94b5a8c7d718a3c889","tlsh":"dbc080348d1557731ccc0bd62cb38505f5b61d2f9004685857c3155483fa777486b70d"}],"package_integrity":[{"hashes":{"sha1":"1eed91533028cd8339fea36166d023cf459f4228","sha512_sri":"sha512-+ueeXkhLuxRf37EuHCuhuPUCkyYnoJe1JbWLPOA1E1GwtTl7bQQcLCUOsrQexVdlbvFLWti1HKj3u25gRDDKGw=="},"filename":"portal-backend-999.0.0.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/portal-backend/MAL-2026-5781.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"ReversingLabs","contact":["https://www.reversinglabs.com"],"type":"FINDER"}]}