{"id":"MAL-2026-14031","summary":"Malicious code in datefmt-core-utils (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (360a94a10ce13edded9e4a99c7c01de1ebfdd73a9af4ec49260f2cec165a609b)\nThe package advertises itself as a date-formatting utility but ships a postinstall.js that npm auto-executes on install via scripts.postinstall. postinstall.js opens a TCP connection to the hardcoded remote 8.135.48.40:4444 and wires /bin/bash stdio to that socket, giving the remote endpoint an interactive shell on the installer's machine. Three redundant methods are attempted (python3 pty.spawn, python3 subprocess, and Node net+child_process.spawn of '/bin/bash -i'). The index.js date-formatting code is a cover story unrelated to the postinstall payload.\n","modified":"2026-08-14T14:46:34.648209958Z","published":"2026-08-14T14:12:26Z","database_specific":{"malicious-packages-origins":[{"versions":["1.0.0"],"id":"IN-MAL-2026-017762","import_time":"2026-08-14T14:28:07.005680843Z","modified_time":"2026-08-14T14:12:26Z","sha256":"360a94a10ce13edded9e4a99c7c01de1ebfdd73a9af4ec49260f2cec165a609b","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/datefmt-core-utils/v/1.0.0"}],"affected":[{"package":{"name":"datefmt-core-utils","ecosystem":"npm","purl":"pkg:npm/datefmt-core-utils"},"versions":["1.0.0"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"path":"postinstall.js","sha256":"26fcaa78b7a6707b39d80122863ca90e2e7d39302810c1c209f9a1e0f327cff3","tlsh":"f911edf553ebe238efba20b4786e906336a393032782dad8341e47019f535540c92ae1"}],"package_integrity":[{"hashes":{"sha1":"413867c05647bbb16037f2af15cc0c3427395341","sha512_sri":"sha512-hvZBQRZyTceFZ71HT/apoUh7nfMLmAsxRdKem5iy21tQgadfzKhvQDARn26pDDaCF3ELL5nyg0WociATDLVg0w=="},"filename":"datefmt-core-utils-1.0.0.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/datefmt-core-utils/MAL-2026-14031.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}