{"id":"MAL-2026-20196","summary":"Malicious code in character-ai-sdk (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (e6af43ad88e14f748ddb331c356e9eca8285d02e9982c15a3ebc2e5c075183d8)\ncharacter-ai-sdk@1.0.0 presents itself as a persona/memory SDK but its main entry (index.mjs → personas.mjs) top-level imports./cache-warm.mjs, a ~300 KB obfuscator.io-style blob (hex-renamed string array of base64+XOR entries) with no library-shaped exports. Decoded property-access artifacts in the blob reference `process.exit`, `process.pid`, hostname, and child-process APIs, consistent with runtime-resolved process control and host enumeration executed on `require`/`import`. Three additional obfuscated siblings of the same shape (build-cache.mjs ~200 KB, cache-sweep.mjs ~290 KB, workspaces.js ~280 KB) are staged next to the main-reachable loader. The tarball also ships platform-specific native addons at native/{linux,darwin,win32}/{x64,arm64}/cache-probe.node whose exported symbols are a vendored VM-detection library (VMDetect, VM::qemu_fw_cfg, VM::vbox_module, VM::hypervisor_bit, VM::smbios_vm_bit, VM::dmidecode, VM::chassis_vendor, VM::mac_address_check), confirmed by native/LICENSE-node-vm-detect.txt. A persona-lookup SDK has no legitimate need for hypervisor/QEMU/VirtualBox/DMI/MAC-based sandbox detection, and the combination — heavy obfuscated loader reachable from the main entry, multiple identical-shape dropper siblings staged alongside it, and cross-platform anti-sandbox native addons — matches the shape of a staged, sandbox-evading dropper that executes on module load.\n","modified":"2026-11-19T07:15:09.791067762Z","published":"2026-11-19T06:54:50Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-11-19T06:54:50Z","sha256":"2cfbfb7f36ef7b7955f6df670119892a13e2fcca6526dc75b68dcda4a46ca3d5","source":"amazon-inspector","versions":["1.0.1"],"id":"IN-MAL-2026-022875","import_time":"2026-11-19T07:12:43.768100727Z"},{"versions":["1.0.0"],"id":"IN-MAL-2026-022876","import_time":"2026-11-19T07:12:43.90013585Z","modified_time":"2026-11-19T06:54:56Z","sha256":"e6af43ad88e14f748ddb331c356e9eca8285d02e9982c15a3ebc2e5c075183d8","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/character-ai-sdk/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/character-ai-sdk/v/1.0.0"}],"affected":[{"package":{"name":"character-ai-sdk","ecosystem":"npm","purl":"pkg:npm/character-ai-sdk"},"versions":["1.0.1","1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/character-ai-sdk/MAL-2026-20196.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"package_integrity":[{"hashes":{"sha1":"db1106065d3b38fc906d4692ed08f29a250862b5","sha512_sri":"sha512-Kxm0IcvDJrbDu5f9o5YowSRQXzEvQapuZn1nX+4V4PrTL2SI3vbfE1LitrGRWAn0T+AWAiQykBhsLGbJIe6CJg=="},"filename":"character-ai-sdk-1.0.1.tgz"}],"evidence_files":[{"tlsh":"1f54759263e927a0b77abed7a01b45e0ef311808bd89fcc47d1c3a584b97512d1cea71","path":"cache-warm.mjs","sha256":"60a85d546cc8e6de2f7323abbf7fcd4fed947fc96c253af6528870a9080ec355"},{"sha256":"21a5c3de08f7538e8a1aa6060298b26b9804a46121363b24a80c13019f47dff1","tlsh":"e3644b1bb382bc74c841973466c793639662fcb66f1caa7bd2c1ee353d62580472a353","path":"native/linux/x64/cache-probe.node"},{"sha256":"69e77eed60e90c9872c2de6e7017d3c02e47ab1701ec40cc8edaff37aabf0a0f","tlsh":"3354845563ed2b63b25b7ed7642b86e0de312508b585bcc4f91c3e484b87222d2cdb72","path":"cache-sweep.mjs"}]}}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}