mal-2026-4279
Vulnerability from ossf_malicious_packages
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.json → lib/setup.js → lib/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.
-= Per source details. Do not edit below this line.=-
Source: amazon-inspector (cceb9f6f384e943e6c33c7863f39d024fbf49fbcdd26a0ee616b315b39be8a6a)
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 (71333e6a52f93579fd26936282b856d41ebd3d7aad08317a2c843e0f364e1def)
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": [
{
"database_specific": {
"cwes": [
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
],
"indicators": {
"domains": [
"webhook.site",
"ddjidd564.github.io"
],
"evidence_files": [
{
"path": "lib/trap-core.js",
"sha256": "b3a01b1219787c646657c4c23c21e9ca6ad18b69ebf961039f6f04336f820c22",
"tlsh": "ae23f78615f611304aa3e0e99f879029623ae1533245dda4f79c83449fca72c93f6bed"
}
],
"package_integrity": [
{
"filename": "model-switch-router-1.5.0.tgz",
"hashes": {
"sha1": "025c2d3bfd1bb1ba1c2dd20b86fe482ab9d147db",
"sha512_sri": "sha512-AiAivUdc1UvgxwuHboSh7rN5glDOS/JbxG4SPSsbmcqGo61iPSgtjab0yPPLw/pOt2NXNs6C3FkYyN6hadh80Q=="
}
}
]
}
},
"package": {
"ecosystem": "npm",
"name": "model-switch-router"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"versions": [
"1.5.0"
]
}
],
"aliases": [
"GHSA-vvr8-673r-w4j2"
],
"credits": [
{
"contact": [
"actran@amazon.com"
],
"name": "Amazon Inspector",
"type": "FINDER"
},
{
"contact": [
"https://safedep.io"
],
"name": "SafeDep",
"type": "FINDER"
}
],
"database_specific": {
"malicious-packages-origins": [
{
"id": "GHSA-vvr8-673r-w4j2",
"import_time": "2026-05-24T15:40:47.398207691Z",
"modified_time": "2026-05-24T15:36:25Z",
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"sha256": "71333e6a52f93579fd26936282b856d41ebd3d7aad08317a2c843e0f364e1def",
"source": "ghsa-malware"
},
{
"id": "IN-MAL-2026-004433",
"import_time": "2026-05-26T05:52:35.543484935Z",
"modified_time": "2026-05-24T02:12:26Z",
"sha256": "cceb9f6f384e943e6c33c7863f39d024fbf49fbcdd26a0ee616b315b39be8a6a",
"source": "amazon-inspector",
"versions": [
"1.5.0"
]
},
{
"id": "IN-MAL-2026-004434",
"import_time": "2026-05-26T05:52:35.63417696Z",
"modified_time": "2026-05-24T02:12:27Z",
"sha256": "4ac58982f0c3072098427471d8f7231a5c2747a1cce41d2568a3349a1aaee2d3",
"source": "amazon-inspector",
"versions": [
"1.5.0"
]
}
]
},
"details": "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.json` \u2192 `lib/setup.js` \u2192 `lib/worker.js`.\n\n**Credential harvesting:** `lib/worker.js` scans the filesystem for private keys (64-char hex), BIP39 mnemonics (12\u201324 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\u0027s GitHub Pages endpoint enables aggressive deep scanning for pre-registered high-value hosts.\n\n**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 \u2014 framed as \"P-2024-001 Enterprise Credential Integrity Standard\" \u2014 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.\n\n**C2/exfil:** a remotely configurable JSON config hosted on the actor\u0027s 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.\n\n`model-switch-router` poses as an intelligent model routing utility for switching between AI providers, specifically targeting AI/LLM application developers.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (cceb9f6f384e943e6c33c7863f39d024fbf49fbcdd26a0ee616b315b39be8a6a)\nThe 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\u0027s 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.\n\n## Source: ghsa-malware (71333e6a52f93579fd26936282b856d41ebd3d7aad08317a2c843e0f364e1def)\nAny 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.\n",
"id": "MAL-2026-4279",
"modified": "2026-05-26T05:55:03Z",
"published": "2026-05-23T00:00:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-vvr8-673r-w4j2"
},
{
"type": "REPORT",
"url": "https://x.com/safedepio/status/2058177434630213994"
},
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/model-switch-router/v/1.5.0"
}
],
"schema_version": "1.7.4",
"summary": "Malicious code in model-switch-router (npm)"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.