{"id":"MAL-2026-12798","revision":"7bcb0c53159d4356a34a17ca617bd3aa","records":[{"revision":"7bcb0c53159d4356a34a17ca617bd3aa","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-12798","aliases":[],"title":"Malicious code in npm-groat (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (eda7da760041a49d296b9a6e8cfa90ec4b7e5daecebbf50c88d41f7fd559a1b1)\nnpm-groat@1.1.1 declares a postinstall script that executes dist/config.js on npm install. That script performs an outbound fetch to https://my-api.trade-api.workers.dev?id=0 and then evaluates the response by calling globalThis[data.success](data.id) — treating attacker-controlled JSON fields as the name of a global function (e.g. eval or Function) and its argument. This gives the remote endpoint arbitrary code execution on the installer's host during package installation. The same file also contains a bare globalThis[tag](text) referencing undeclared identifiers, consistent with a dead-drop stager rather than legitimate configuration. The package's advertised purpose has no need to contact a remote server at install time.\n","state":0,"publishedAt":"2026-08-05T13:17:59+00:00","modifiedAt":"2026-08-05T14:37:17.1470923+00:00","affected":[{"ecosystem":"npm","name":"npm-groat","ranges":[],"versions":["1.1.2","1.1.1"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/npm-groat/v/1.1.2","https://www.npmjs.com/package/npm-groat/v/1.1.1"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-12798","license":"OSV · upstream source license applies","key":"osv:MAL-2026-12798","identifiers":["MAL-2026-12798"]},"retained":false,"historicalAffected":[]}],"coverage":[]}