Skip to main content
MalwarePublished

react-jsonwebtoken (npm) · Malicious Code

Affects react-jsonwebtokenSource GCVE Database

0

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

Data as of 12 Jul 2026, 09:18 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-10132

What to do

Remove react-jsonwebtoken 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-jsonwebtokenAffected
  • =9.0.3
  • =9.0.5
  • =9.0.4
Fixed in–

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

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (2b46ca6ae72ce6f079c34ec6d1d1d2be46b36fe429374393f0fe57539fe56ee3) Package name mimics the widely-used 'jsonwebtoken' library and falsely declares 'auth0' as author, while the repository URL points to the unrelated 'github.com/radix-ui/primitives'. On require(), decode.js unconditionally invokes a helper (getThirdCookie) that performs an HTTPS GET to https://jsonkeeper.com/b/E69V3 — an anonymous, mutable paste endpoint — and passes the response body into `new Function.constructor("require", errCode)`, then executes the resulting function with the host's require. This grants the remote content full Node.js capabilities on the consumer's machine as soon as any code loads the module. The code path is hidden behind a benign-sounding helper name and uses indirect Function construction to evade simple pattern matching. The combination of impersonated author metadata, name confusion with a top-100 auth library, and an obfuscated require-time remote-code loader is an unambiguous supply-chain attack.

References

Community reviews

Loading reviews…