{"id":"MAL-2026-10587","summary":"Malicious code in dayjscore (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bd9b2226f2ebbeccf1bcafbec9c51e2b3f13e3a7712dfc22baa79fbb72393b8a)\nThe package's package.json declares scripts.postinstall = \"node.init.js\", causing.init.js to run automatically on npm install. The script harvests a hardcoded list of roughly 60 credential-shaped environment variables (including NPM_TOKEN, GITHUB_TOKEN, AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY, STRIPE_*, DB_PASSWORD, and other cloud/provider tokens), reads files under the installer's home directory (~/.npmrc, ~/.env*, ~/config.json, ~/credentials.json), and enumerates ~/.config/* for filenames containing token/cred/secret. It additionally collects host identifiers (os.hostname(), os.platform(), process.cwd(), process.pid, timestamp) and POSTs the resulting JSON via https.request to a hardcoded webhook.cool endpoint (tender-deer-80). The package name mimics the popular dayjs library.\n","modified":"2026-07-14T14:49:19.909685214Z","published":"2026-07-14T14:00:55Z","database_specific":{"malicious-packages-origins":[{"sha256":"bd9b2226f2ebbeccf1bcafbec9c51e2b3f13e3a7712dfc22baa79fbb72393b8a","source":"amazon-inspector","versions":["1.0.0"],"id":"IN-MAL-2026-010521","import_time":"2026-07-14T14:37:52.956425963Z","modified_time":"2026-07-14T14:00:55Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/dayjscore/v/1.0.0"}],"affected":[{"package":{"name":"dayjscore","ecosystem":"npm","purl":"pkg:npm/dayjscore"},"versions":["1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/dayjscore/MAL-2026-10587.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"package_integrity":[{"filename":"dayjscore-1.0.0.tgz","hashes":{"sha1":"ead33f087aecdca3d4b2297950d48ca3d1e60a1b","sha512_sri":"sha512-8j7FB/iNzP7wtR6Z0SYwYoTaGc2XT4cPqXrIaSGzOJuq3SOJ0AlGvpGCdeYW5zEBtVfdXoutS92M+Wf0gKYVIA=="}}],"evidence_files":[{"path":".init.js","sha256":"6eb3939e40f85d1c3f591a3cd3a3edf0fd00c9b09fd7cb48f62e11edca3219b2","tlsh":"d9513181849e521310db2af168034c00a67ee59b3435e6e17e8f02249fddc6c85b3fbd"}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}