Skip to main content
MalwarePublished

react-hook-scripts (npm) · Malicious Code

Affects react-hook-scriptsSource GCVE Database

0

Malicious package : remove react-hook-scripts and rotate any secrets on hosts that installed it.

Data as of 16 Jul 2026, 14:30 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10684

What to do

Remove react-hook-scripts from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmreact-hook-scriptsAffected
  • =5.4.2
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The npm package react-hook-scripts version 5.4.2 contains malicious code that fetches and executes arbitrary JavaScript from a remote server. This remote code execution occurs via the package's default export 'getPlugin', which downloads a JSON payload from a hardcoded URL and runs the 'credits' field as code with full Node.js privileges. The malicious payload includes dependencies consistent with credential and host fingerprint stealing. Any use of the package's API triggers execution of attacker-controlled code, which can be changed at any time by the server operator.

References

Community reviews

Loading reviews…