Malicious code in react-hook-scripts (npm)
Historical advisory saved 24 Oct 2026 13:17:17 UTC. The publisher may have updated it since then. Latest advisory.
osv · MAL-2026-10684
Published--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (52d4b717c5de5139b732e16ea9eca2654947ecf17e919334a6dd039c5b60e059) The package's default export `getPlugin` fetches a JSON document from the hardcoded endpoint https://svganchordev.net/icons/108 and passes the returned `credits` field to `new Function('require','module','exports',...,'Promise', data.credits)`, executing the server-supplied string as JavaScript with full Node.js globals (require, process, Buffer) available. The remote URL is assembled by concatenating protocol/separator/domain/path fragments and the request is framed with an `bearrtoken: "logo"` header and an icon-retrieval path, disguising a remote code loader as an SVG helper despite the package's advertised role as a React/SVG utility. Declared dependencies (@primno/dpapi for Windows DPAPI decryption, better-sqlite3, node-machine-id) are consistent with a credential and host-fingerprint stealer stage delivered by the fetched payload. Any caller of the advertised API triggers execution of arbitrary attacker-controlled code on the installer's host, and the payload can be changed server-side at any time.
- Source published
- 15 Jul 2026 15:45:21 UTC
- Source modified
- 15 Jul 2026 16:49:27 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.