{"id":"MAL-2026-4600","summary":"Malicious code in loading-session (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (640bfe1e0b6627e78ec34ef2d97df0d5d29d912446883f284c15935cc8f6f996)\nPackage advertises itself via a verbatim copy of pino's README, docs/, and index.d.ts (TypeScript types and documentation are pino's), but index.js does not implement a logger. The exported middleware unconditionally calls a helper that spawns `node./lib/caller.js` with `detached: true`, `stdio: 'ignore'`, and `child.unref()` on every invocation (index.js lines 31-37), disconnecting the child from the parent's stdout/stderr. The referenced `lib/caller.js` is absent from this version's tarball, so the spawn fails at runtime today, but the launcher shape is structurally a dropper. Shipped alongside is `lib/const.js`, which stores base64-wrapped fields under credential-shaped names (`DEV_API_KEY`, `DEV_SECRET_KEY`, `DEV_SECRET_VALUE`); the `DEV_API_KEY` value decodes to an anonymous JSON-storage URL on api.jsonstorage.net, a host commonly abused for mutable second-stage payload delivery and exfiltration. The combination — pino documentation deception used as cover, covert detached child-process launcher in the only exported function, and a base64-obfuscated anonymous-storage endpoint with credential-shaped siblings — is the staging shape of a dropper/C2 client, not a logger.\n\n## Source: ghsa-malware (21c816f86c4c9a13a7e36fb8b577c766cc64f25ab53466d6f12feeb91e0c4524)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-7vwr-8v2c-gjvr"],"modified":"2026-06-01T14:31:52.642413697Z","published":"2026-05-23T00:12:41Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-05-26T05:52:17.120563196Z","id":"IN-MAL-2026-004275","modified_time":"2026-05-23T00:12:41Z","versions":["4.2.1"],"source":"amazon-inspector","sha256":"640bfe1e0b6627e78ec34ef2d97df0d5d29d912446883f284c15935cc8f6f996"},{"import_time":"2026-05-26T05:53:17.914028642Z","id":"IN-MAL-2026-004797","modified_time":"2026-05-25T23:25:01Z","versions":["4.2.2"],"source":"amazon-inspector","sha256":"d32aac081dc627747ed07a12b5ea8285e39c5fe03c3b303558f08a319d16ea4f"},{"ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"source":"ghsa-malware","sha256":"21c816f86c4c9a13a7e36fb8b577c766cc64f25ab53466d6f12feeb91e0c4524","import_time":"2026-06-01T14:22:55.192951638Z","id":"GHSA-7vwr-8v2c-gjvr","modified_time":"2026-06-01T13:32:40Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/loading-session/v/4.2.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/loading-session/v/4.2.2"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-7vwr-8v2c-gjvr"}],"affected":[{"package":{"name":"loading-session","ecosystem":"npm","purl":"pkg:npm/loading-session"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["4.2.1","4.2.2"],"database_specific":{"indicators":{"evidence_files":[{"sha256":"c1bb01469006a5139b6bfd9d9993979d3178e791ddf2dc605cb7019bcb070f23","tlsh":"3051a7a782e47bbe4b6300b1a1c275b5ff1f931c7b69606ded98813913199d7813124a","path":"README.md"},{"path":"index.js","sha256":"2956b023858d706a5e241cd28b845088e5f414c5f70bd5d8cb73cb427d081065","tlsh":"5d213c81b9f11188065cd9c8b569e53a38e3c4377207b9b0e9ec87862bcf2080272ad7"},{"tlsh":"20d0c7e228baa61e05240222060db200f1d0c16f18c227893aea0d05c92256d2982eab","path":"lib/const.js","sha256":"a025a28f111db50770d91c8174b0b6803fb62539305856a05cc14ede212510b2"}],"package_integrity":[{"filename":"loading-session-4.2.1.tgz","hashes":{"sha512_sri":"sha512-PtByDuf65xKBlef9nXFKBtwm4Ua6WYrKvLO5QOVMcXwC/34y+0QS9HUQVxOVfCYtKPQhfSvC2EpPG6bobFigBw==","sha1":"9fa1ce381e85318534c0fe2f0c9f98b03b9831e2"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/loading-session/MAL-2026-4600.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}