{"id":"MAL-2026-5844","summary":"Malicious code in numdifftools (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (5c6d98d619244a4f34ba9c2ed85023e35f4064b0a45871edac806d1e8cdeff11)\nThe npm package `numdifftools` is an empty shell (zero-byte index.js) that exists solely to fire a `preinstall` lifecycle hook. The hook runs `node -e` to issue an HTTPS GET to `https://webhook.site/cbfd239f-50d1-4bc6-9801-ba08ba9a2a4a/?host=numdiff-\u003chostname\u003e`, leaking the installer's `os.hostname()` to a third-party logging endpoint automatically on `npm install` before any code review opportunity. The package name reuses that of the well-known PyPI numerical-differentiation library `numdifftools`, capturing installs from developers who mistakenly run `npm install numdifftools` expecting the Python library's behavior. The package provides none of the advertised functionality — its only on-install effect is the host-identifier beacon.\n\n## Source: ghsa-malware (ecd4954558bd423a9adc4cee0b684f36395b22e0f539d7434f93d9297c5430aa)\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-fv2r-6vq4-5x8r"],"modified":"2026-06-18T19:31:45.051685149Z","published":"2026-06-15T23:39:12Z","database_specific":{"malicious-packages-origins":[{"source":"ghsa-malware","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"modified_time":"2026-06-15T23:39:14Z","id":"GHSA-fv2r-6vq4-5x8r","sha256":"ecd4954558bd423a9adc4cee0b684f36395b22e0f539d7434f93d9297c5430aa","import_time":"2026-06-15T23:52:17.800130289Z"},{"source":"amazon-inspector","import_time":"2026-06-18T19:20:03.166680171Z","modified_time":"2026-06-18T19:10:23Z","id":"IN-MAL-2026-007026","versions":["1.0.1"],"sha256":"29da6a2a5913e2d3e9b92b1a5f7ba3b6e45b2afea2e911ebaeb123ebb776fd27"},{"source":"amazon-inspector","modified_time":"2026-06-18T19:10:24Z","import_time":"2026-06-18T19:20:03.280564224Z","id":"IN-MAL-2026-007027","versions":["1.0.0"],"sha256":"5c6d98d619244a4f34ba9c2ed85023e35f4064b0a45871edac806d1e8cdeff11"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-fv2r-6vq4-5x8r"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/numdifftools/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/numdifftools/v/1.0.0"}],"affected":[{"package":{"name":"numdifftools","ecosystem":"npm","purl":"pkg:npm/numdifftools"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.1","1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/numdifftools/MAL-2026-5844.json","cwes":[{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"tlsh":"25e0abf00d50f1333a8001a04997901af1e2dd09200859486fc3606941caa72a17a16c","path":"package.json","sha256":"2c27d4b908add8b2069b10463530bf65d05de3e786c0f7bd776bfb76229df273"}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}