char-ai-sdknpm
Advisory published Updated
char-ai-sdk is a confirmed malicious npm package (MAL-2026-20195) that executes malicious code on install (malicious version 1.0.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in char-ai-sdk (npm)
What this malware does
Package advertised as an AI SDK (persona/memory/Bedrock/OpenAI) ships four large obfuscator.io-style blobs at the package root — cache-warm.mjs (~280 KB), cache-sweep.mjs (~298 KB), build-cache.mjs (~204 KB), workspaces.js (~290 KB) — each disguised with an identical 'Auto-generated by [email protected] - build cache manifest' header followed by a base64/XOR-encoded _0x<hex> string array. These files are listed in package.json files and are reached on import: the main entrypoint re-exports from personas.mjs, which top-level imports./cache-warm.mjs, so requiring or importing the package unconditionally executes the opaque decoder and payload. In addition, native/<platform>/<arch>/cache-probe.node is a prebuilt N-API addon exporting VMDetect/VMDetectWorker that enumerates hypervisor, QEMU, VirtualBox, Docker, Podman, WSL, Bluestacks, AMD-SEV, SMBIOS/DMI, chassis, MAC, firmware and PCI signals; the filename misdescribes its contents and the capability is unrelated to the SDK's advertised purpose. The clean SDK code lives under dist/ and does not reference the obfuscated blobs or the VM-detect addon. The combination — import-time execution of a hex-identifier obfuscated blob behind a cover comment, co-shipped with a sandbox/VM-detection native binary — is the standard dropper + anti-analysis shape and provides arbitrary code execution on installer machines on npm install followed by any require/import of the package.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for char-ai-sdk (version 1.0.0).
If you installed it — respond
Remove char-ai-sdk from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If char-ai-sdk was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks char-ai-sdk-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.