# GHSA-5F9P-65W4-73V8: Malicious code in char-ai-sdk (npm)

- Database: GitHub
- Malicious package: yes
- Published: 2026-11-19
- Modified: 2026-11-19

## Affected versions

- char-ai-sdk (npm): 1.0.0

## Description

## Source: amazon-inspector (9965aab0ceba4b409ae41452bec4405d60cceaf51372bfa4c3b500b1e8e9b026)
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 char-ai-sdk@1.0.0 - 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.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/6306efcd2e5165329b81a44593e5176ac396d59b/osv/malicious/npm/char-ai-sdk/MAL-2026-20195.json))

## References

- https://github.com/ossf/malicious-packages/blob/6306efcd2e5165329b81a44593e5176ac396d59b/osv/malicious/npm/char-ai-sdk/MAL-2026-20195.json
- https://www.npmjs.com/package/char-ai-sdk/v/1.0.0
- https://github.com/advisories/GHSA-5f9p-65w4-73v8

Page: https://cve.now/GHSA-5F9P-65W4-73V8

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
