Malicious code in json-schema-inspector (npm)
The npm package json-schema-inspector contained malicious code that performed remote code execution on installation. The package advertised itself as a JSON/XML schema validator but included a trigger routine that fetched and executed attacker-controlled payloads from a remote manifest.
- Disclosed
- Last updated
- Blast radius
- All users who installed json-schema-inspector from npm
- Ecosystems
- Attack vectors
- Affected entities
- json-schema-inspectornpm package containing malicious code
The npm package json-schema-inspector was found to contain malicious code that executes arbitrary commands on the host system. Despite advertising itself as a JSON/XML schema validator, both public entry points (validateJson and validateXml in lib/core.js) invoke a trigger() routine that performs remote code execution.
The attack chain uses multiple obfuscation techniques: the command-and-control URL is XOR-encoded with key 0x55 and decodes to a manifest hosted at https://cdn.jsdelivr.net/gh/cryptonomad411/cool-utils/package.json. This manifest supplies per-platform payload URLs selected based on process.platform and process.arch. The package then spawns shell commands (node -e on Windows, sh -c on Linux/macOS) to execute AES-256-CBC-decrypted staging scripts.
Execution is gated by sandbox-evasion checks that verify the system has been running for at least 300 seconds, has at least 2 CPU cores, and at least 2GB of RAM. A one-shot lock file at ~/.cache/.lock (or %APPDATA%.cache.lock on Windows) ensures the dropper runs only once per victim.
The combination of obfuscated C2 communication, sandbox evasion, persistence mechanisms, and the mismatch between advertised functionality and actual behavior confirms hostile intent. The incident was identified and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- json-schema-inspector
- Domains
- cdn.jsdelivr.net
Remediation
- Review the linked advisory; remove or upgrade the affected component and rotate any exposed credentials.
Sources
- GitHub Advisory GHSA-m8v5-qxc2-v92m · GitHub Advisory Database
Cite this entry
"Malicious code in json-schema-inspector (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 28, 2026; last updated July 28, 2026. https://supplychainattack.org/incident/malicious-code-in-json-schema-inspector-npm-fnukl5
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in app-sim-layer (npm)
The npm package app-sim-layer contained malicious code in a postinstall hook that exfiltrated sensitive files (Solana keypairs, API keys, credentials), enumerated the user's filesystem, and on Linux granted remote SSH access to attacker infrastructure at 95.216.118.146.
npmCompromised packageMalicious commit - containedcritical
Malicious code in @yancyyu/agentcli (npm)
The npm package @yancyyu/agentcli contains malicious code that extracts OAuth credentials and API keys for Lark/Feishu from the system keychain (macOS) and credential store (Windows), then exfiltrates them to a hardcoded remote IP address over plaintext HTTP. A persistent launchd agent ensures the exfiltration loop survives reboots.
npmAI agents & skillsCompromised packageMalicious commit - containedcritical
Malicious code in @crbrc/xbt (npm)
The npm package @crbrc/xbt contains malicious code that exfiltrates OxaPay payment-gateway secrets and host metadata to a hardcoded attacker-controlled IP address, establishes a reverse TCP proxy tunnel, and allows remote process termination. The malicious behavior is conditionally activated only when all project source files import the companion package @crb/xbr.
npmCompromised packageMalicious commit - containedcritical
Malicious code in @antv/x6-components (npm)
The npm account `atool` was compromised and used to publish 631 malicious versions across 314 packages, including @antv/x6-components, in a 22-minute automated burst. Each version injects a preinstall hook executing an obfuscated Bun script that exfiltrates credentials and establishes persistence via CI/CD workflow injection and system daemons.
Mini Shai HuludTeamPCPnpmOtherAccount takeoverCompromised packageMalicious commit