{"id":"MAL-2026-11106","summary":"Malicious code in date-sanitize-helper (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (33b6764b7711cfa03cf6b3a2f70e24b3256a61ac9319d45200ada236fe7c3ed2)\nThe package is advertised as a date parsing/sanitization helper but its postinstall.js runs automatically on npm install and performs installer-side data collection unrelated to the stated purpose. The script shells out via child_process/exec and curl to gather hostname, current user, id output, sudo -l output, uname, cwd, container indicators, GitHub Actions environment, running process list, and network information. It filters environment variables against a credential keyword set (KEY, TOKEN, SECRET, CREDENTIAL, KUBE, JENKINS, NPM, GEM, CARGO, AZURE, GCP, AWS_, GH_TOKEN, GITHUB_TOKEN) and probes cloud instance-metadata endpoints (AWS 169.254.169.254, Tencent, Aliyun). The aggregated output is base64-encoded and posted via curl to the hardcoded host pzs5w7ntzhsnepwk564lyfdci3oucl0a.oastify.com (a Burp Collaborator subdomain). Postinstall.js contains Chinese-language comments describing a 'compact exfil version', and index.js is an unrelated small color utility, indicating deliberate cover-story metadata.\n\n## Source: ossf-package-analysis (0ad5bc011fffec78eedbae93d69fa652c21868e6a8492f3c4a34cdb08dffd6e1)\nThe OpenSSF Package Analysis project identified 'date-sanitize-helper' @ 1.0.0 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n\n- The package executes one or more commands associated with malicious behavior.\n","modified":"2026-07-28T14:36:54.228343660Z","published":"2026-07-28T07:15:55Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-07-28T07:15:55Z","versions":["1.0.0"],"source":"ossf-package-analysis","sha256":"0ad5bc011fffec78eedbae93d69fa652c21868e6a8492f3c4a34cdb08dffd6e1","import_time":"2026-07-28T07:26:58.291962473Z"},{"sha256":"33b6764b7711cfa03cf6b3a2f70e24b3256a61ac9319d45200ada236fe7c3ed2","import_time":"2026-07-28T14:19:57.208612991Z","id":"IN-MAL-2026-010880","modified_time":"2026-07-28T13:30:58Z","versions":["1.0.0"],"source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/date-sanitize-helper/v/1.0.0"}],"affected":[{"package":{"name":"date-sanitize-helper","ecosystem":"npm","purl":"pkg:npm/date-sanitize-helper"},"versions":["1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/date-sanitize-helper/MAL-2026-11106.json","indicators":{"evidence_files":[{"path":"postinstall.js","sha256":"2f12974f8ceb206a773b9456efee5274e5bc739dc9d7436fdc7f0893ce61af82","tlsh":"834189e8f619b834364dc4f8b68e55027893e9af89f4ff74553b4db0044c98820aab36"},{"tlsh":"24e02b2088115b3368c4a7b55d53634bbe320e1f12807c1917a77594c38f6ba45bf72e","path":"package.json","sha256":"afa92662e6b9bb97786baa6af2d01cdbdc94523daa7a8f4cd460d28459b3f60a"}],"package_integrity":[{"filename":"date-sanitize-helper-1.0.0.tgz","hashes":{"sha1":"58ebecddd40bb2b4109312cd3f9b95a2e8ac6e7e","sha512_sri":"sha512-gmHN2bgD023WXMtDFFkZMbWmCAVtWolqjQLVGvga/y+n6XDY9leUq3jnWFyvO6qyMO2snwCrIzCMmmJSpfEujw=="}}]},"cwes":[{"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":["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"}]}