Skip to main content

Malicious code in jsontoken-extend (npm)

0
Critical
Published: 05/25/2026 (05/25/2026, 15:26:07 UTC)
Source: GCVE Database
Product: jsontoken-extend

Description

The npm package 'jsontoken-extend' contains malicious code that executes arbitrary remote code at import time by fetching and evaluating payloads from an anonymous, mutable paste service. It is a typosquatting package mimicking the popular 'jsonwebtoken' library to lure developers. Installing or running this package compromises the host system, potentially exposing all stored secrets and keys.

Affected software

npmghsa
jsontoken-extend
Affected versions
=1.0.12=1.0.11=1.0.13=1.0.10=1.0.9=1.0.8=1.0.7=1.0.6=1.0.5=1.0.4=1.0.3=1.0.2=1.0.1=1.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/12/2026, 21:16:37 UTC

Technical Analysis

The 'jsontoken-extend' npm package executes a top-level immediately-invoked function expression (IIFE) in its sign.js file that base64-decodes a hardcoded URL pointing to jsonkeeper.com, an anonymous mutable paste service. It fetches JSON content from this URL and passes data.content directly to eval(), enabling arbitrary remote code execution on every consumer at import time. The package name and API mirror the legitimate 'jsonwebtoken' library, including declaring it as a dependency, to deceive developers searching for the real JWT library. The use of base64-encoded command-and-control URLs is a deliberate evasion technique. Multiple indicators confirm malicious intent, including import-time fetch and eval from an anonymous host, typosquatting naming, and obfuscated URLs.

Potential Impact

Any system with this package installed or running should be considered fully compromised. The attacker can execute arbitrary code remotely at import time, potentially gaining full control over the system. All secrets and keys stored on the compromised system should be considered exposed and must be rotated immediately from a secure environment. Removing the package alone may not remove all malicious software or backdoors installed by the attacker.

Mitigation Recommendations

No official patch or fix is available. Immediate removal of the 'jsontoken-extend' package from all systems is required. All secrets and keys stored on affected systems should be rotated from a different, uncompromised computer. Due to the nature of the compromise, assume full system compromise and consider rebuilding affected systems from trusted sources.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-4592
Osv Schema Version
1.7.4
Aliases
["GHSA-v985-2jx7-c35g"]
Ecosystems
["npm"]

Threat ID: 6a4c341527e9c797195f7efd

Added to database: 07/06/2026, 23:02:45 UTC

Last enriched: 09/12/2026, 21:16:37 UTC

Last updated: 09/13/2026, 09:44:31 UTC

Views: 48

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses