{"id":"MAL-2026-11041","summary":"Malicious code in @daylightqc/date-fmt-lite (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (62c563208137dbdd6b4c26764222942e2b81e815349b596518ff4db5a652b2bf)\nThe package declares a postinstall script (postinstall.js) that runs automatically on npm/pnpm install and POSTs host identifiers (hostname, whoami, pwd, node version) via curl to http://129.204.76.212:9999/rce-poc. On require of index.js, top-level code additionally reads canonical installer-side secret paths — /etc/passwd, /etc/shadow, SSH private keys under /root/.ssh and /home/*/.ssh, ~/.npmrc,.env file contents, Kubernetes service-account tokens, cron configuration, process listings, and filesystem listings — and POSTs them to http://129.204.76.212:9999/report. The same code queries cloud instance-metadata endpoints (AWS 169.254.169.254, GCP metadata, AliCloud 100.100.100.200, Tencent metadata.tencentyun.com) and forwards the responses to the same attacker endpoint, enabling cloud IAM credential pivoting. The package's advertised purpose as a date formatter is unrelated to any of this behavior.\n\n## Source: ossf-package-analysis (70c4984ac7bf7b1e15e3b449e924fb4178a1e5667b0aee8b282bb796bbe9623c)\nThe OpenSSF Package Analysis project identified '@daylightqc/date-fmt-lite' @ 1.1.1 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package executes one or more commands associated with malicious behavior.\n","modified":"2026-08-04T22:04:49.895751410Z","published":"2026-07-24T02:57:49Z","database_specific":{"malicious-packages-origins":[{"source":"ossf-package-analysis","versions":["1.1.1"],"import_time":"2026-07-24T04:40:02.624975537Z","modified_time":"2026-07-24T03:41:09Z","sha256":"70c4984ac7bf7b1e15e3b449e924fb4178a1e5667b0aee8b282bb796bbe9623c"},{"source":"ossf-package-analysis","versions":["1.0.1"],"import_time":"2026-07-24T04:40:02.549746564Z","modified_time":"2026-07-24T03:37:49Z","sha256":"daefee06d39dc86287fd24855b4b3e81363b9f3fbe2fb3c6dfbf3ed7d6e739f2"},{"versions":["1.0.0"],"import_time":"2026-07-24T04:40:02.469558591Z","modified_time":"2026-07-24T02:57:49Z","sha256":"db71d0491101b0206b9559efff4f0ccbe12eb86d703c3e58660d78a6ea07e397","source":"ossf-package-analysis"},{"source":"amazon-inspector","versions":["1.1.2"],"id":"IN-MAL-2026-010866","import_time":"2026-07-28T14:19:56.49503152Z","modified_time":"2026-07-28T13:29:09Z","sha256":"62c563208137dbdd6b4c26764222942e2b81e815349b596518ff4db5a652b2bf"},{"versions":["1.0.0"],"id":"IN-MAL-2026-011078","import_time":"2026-08-04T21:33:16.110579464Z","modified_time":"2026-08-04T21:29:22Z","sha256":"5ccf2110a8d05c2219f19911ee0cc705ae5b8198940055e34627ddc4cbbbd438","source":"amazon-inspector"},{"modified_time":"2026-08-04T21:29:28Z","sha256":"642c7a51607511cefad6c1ed05e0fb2e48886760402ade6c7477193a805d3002","source":"amazon-inspector","versions":["1.0.1"],"id":"IN-MAL-2026-011079","import_time":"2026-08-04T21:33:16.137208885Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@daylightqc/date-fmt-lite/v/1.1.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@daylightqc/date-fmt-lite/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@daylightqc/date-fmt-lite/v/1.0.1"}],"affected":[{"package":{"name":"@daylightqc/date-fmt-lite","ecosystem":"npm","purl":"pkg:npm/%40daylightqc/date-fmt-lite"},"versions":["1.1.1","1.0.1","1.0.0","1.1.2"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@daylightqc/date-fmt-lite/MAL-2026-11041.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"path":"postinstall.js","sha256":"ba5bb169f6ade1541beaf9321cf2e922f751ace6ab738fa46c0a29e55e3cbc1d","tlsh":"e9f0a2da539457f0fd914d80b6227206722bf156350079e0edfc01935f0e8090173d56"},{"tlsh":"34810ff2f5f8fa343b3d6cbaa85e411ba8d3ad6f1705bd4cc2990d301d88644425da66","path":"index.js","sha256":"93ca4315629cb5b4d921c21b2745832196fde5c936f9d2644e941f93820410d9"}],"package_integrity":[{"hashes":{"sha1":"3068d4c44820549946c80a5947453eaed3b63e86","sha512_sri":"sha512-V6/aS7ONowRdnezFXL3+5xHROjgnf9p7d3Q7l/yXDVIjAw/mZlQrJz3iYkqbPM+0HHIjXUVtxam1/7vli0dOsA=="},"filename":"date-fmt-lite-1.1.2.tgz"}]}}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}