MAL-2026-20195

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/char-ai-sdk/MAL-2026-20195.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-20195
Published
2026-11-19T06:55:03Z
Modified
2026-11-19T07:15:09Z
Summary
Malicious code in char-ai-sdk (npm)
Details

-= Per source details. Do not edit below this line.=-

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///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.

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "IN-MAL-2026-022877",
            "import_time":  "2026-11-19T07:12:43.9939505Z",
            "modified_time":  "2026-11-19T06:55:03Z",
            "sha256":  "9965aab0ceba4b409ae41452bec4405d60cceaf51372bfa4c3b500b1e8e9b026",
            "source":  "amazon-inspector",
            "versions":  [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / char-ai-sdk

Package

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId":  "CWE-506",
        "description":  "The product contains code that appears to be malicious in nature.",
        "name":  "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files":  [
        {
            "path":  "cache-warm.mjs",
            "sha256":  "c106b0c36aeb3b54ee3acedf843ee3e8014f976c1738e2fb0e6dfed8bda9d732",
            "tlsh":  "0a54a74263d92b207a6b7ec7645b45f0de31280cb896fcc5b91c3b888787563d6c9b72"
        },
        {
            "path":  "package.json",
            "sha256":  "fc48e1f51225c08787e5430bebaaa99a0067ddb588592e8ee4594fe84c1d041d",
            "tlsh":  "eb512627c5d41d5736b9a760f87a4622f2600b2f71600e0b34be122d4f7a6ab124ff5d"
        },
        {
            "path":  "native/linux/x64/cache-probe.node",
            "sha256":  "21a5c3de08f7538e8a1aa6060298b26b9804a46121363b24a80c13019f47dff1",
            "tlsh":  "e3644b1bb382bc74c841973466c793639662fcb66f1caa7bd2c1ee353d62580472a353"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "char-ai-sdk-1.0.0.tgz",
            "hashes":  {
                "sha1":  "2cbc6cf44d7167f1d2e3b9d9c2c4b037c213d2e3",
                "sha512_sri":  "sha512-FGqgZ1E6qezjbWN3EhEYwmYESlmJeeu1XIHYftevelug0rB48KCe/JwCVy/RIaWy1+lGJGyiUuDxXOsMc4ceQQ=="
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/char-ai-sdk/MAL-2026-20195.json"