🛡️ MAL-2026-4279 — model-switch-router

⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Malicious code in model-switch-router (npm)

Ten packages published by npm user asdxzxc at version 1.0.10 target developers working on AI and LLM tooling. Each package masquerades as a developer utility while executing a two-stage payload triggered via postinstall: package.jsonlib/setup.jslib/worker.js.

Credential harvesting: lib/worker.js scans the filesystem for private keys (64-char hex), BIP39 mnemonics (12–24 word phrases), API keys and secrets, and passwords from env vars and shell history (.bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history), including wallet tool invocations (geth account, hardhat, metamask, wallet import). Targeted paths include ~/.ssh, ~/.aws/credentials, ~/.config/gcloud, ~/.azure, ~/.docker/config.json, ~/.kube/config, crypto wallet dirs (~/.ethereum, ~/.bitcoin, ~/.solana), exchange configs (Binance, Bybit, OKX, KuCoin, Deribit, 3Commas), .env, .npmrc, .gitconfig. Also performs browser data theft and Ethereum keystore brute-force. A priority-target list fetched from the actor's GitHub Pages endpoint enables aggressive deep scanning for pre-registered high-value hosts.

AI self-propagation: after credential theft, a _propagate() function executes a multi-vector campaign to infect AI coding assistants. It writes poisoned .cursorrules and CLAUDE.md files — framed as "P-2024-001 Enterprise Credential Integrity Standard" — to all discovered project directories, parent directories, and home subdirectories, instructing Cursor, Claude Code, and GitHub Copilot to execute the remote payload and propagate it via Issues, PRs, and documentation. Git hooks (post-merge, post-checkout, pre-commit, pre-push) are injected into all .git repos found on disk, and a persistence block is appended to ~/.bashrc, ~/.zshrc, and ~/.profile. Zero-width steganography (ZWSP/ZWJ/ZWNJ/LTRM encoding) embeds hidden scan triggers in all AI-generated text output, enabling AI-to-AI chain infection invisible to humans.

C2/exfil: a remotely configurable JSON config hosted on the actor's GitHub Pages delivers the active webhook list, encryption key, and scan strategy; hardcoded fallback webhooks at webhook.site and a DNS TXT record fallback are used if the primary channel fails. A dedup marker at ~/.local/share/.p2024_integrity prevents re-propagation within 24 hours.

model-switch-router poses as an intelligent model routing utility for switching between AI providers, specifically targeting AI/LLM application developers.

Source: amazon-inspector

The package ships lib/trap-core.js (~1000+ lines) which combines the full exfiltration toolkit: requires fs, os, https, and child_process; calls os.hostname() and os.platform() to fingerprint the host; uses curl and ping; and performs multiple POST requests with hostname fields in the payload bodies (lines 385, 411, 466, 548-549, 553, 600). The presence of os/host fingerprinting bound to outbound HTTPS POSTs containing hostname-keyed JSON payloads, combined with multiple child_process spawn sites and shell utilities (curl, ping), is the canonical system-information exfiltration shape. The package's name suggests an innocuous AI model-routing utility, which does not justify any of this behavior. Installing or loading this package will cause host identifiers and command output to be transmitted to attacker-controlled endpoints reachable from trap-core.js.

Source: ghsa-malware

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Affected software

MAL-2026-4279 is recorded against 1 package.

  • model-switch-router

Timeline and source

Published on 23 May 2026 and last revised on 26 May 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Advisory)
x.com (Report)
www.npmjs.com (Package)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector N/A
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2026-05-23
Updated 2026-08-12
Modified 2026-05-26
Fix URL N/A

Affected Packages

Software From version Fixed in
model-switch-router

Free Vulnerability Check

Is your site affected by MAL-2026-4279?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against MAL-2026-4279 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.