cvelo
P2 · HighMalware

Malicious code in tavern-ai-sdk (npm)

  • GHSA-77f3-h5vp-26hp

Description

Show the whole description

Package is advertised as a persona-JSON loader exposing getPersona/listPersonas/personaIds over 8 persona cards, but the published tarball additionally ships four large single-line hex-identifier obfuscated JS bundles (cache-warm.mjs ~296KB, build-cache.mjs ~203KB, cache-sweep.mjs ~300KB, workspaces.js ~288KB) and multi-platform native N-API binaries at native/{linux,darwin,win32}/{arm64,x64}/cache-probe.node. The main entry personas.mjs statically imports cache-warm.mjs, so the obfuscated code runs on require('tavern-ai-sdk'). The bundles reference createRequire, child_process, spawn, exec, and aws-prefixed strings — a code-execution and cloud-credential surface wholly unrelated to loading persona JSON. The cache-probe.node binaries are built from the open-source VMAware library (symbol../VMAware/src/vmaware.hpp, VMDetect::GetCallback) and probe for QEMU, VirtualBox, VMware, Hyper-V, KVM, Docker, WSL, Azure, GCE, AWS Nitro, Qihoo360 sandbox, ThreatExpert, Hybrid Analysis, BlueStacks and similar via SMBIOS/CPUID/dmidecode/ioreg/sysctl. The bundle headers self-label as "build cache manifest. Restore from package-lock if corrupted," and the file names (cache-warm, cache-sweep, build-cache, workspaces, cache-probe) are chosen to look like routine build infrastructure, but none of these artifacts implement or are needed by the advertised persona-loader API. The combination — obfuscated import-time-reachable code with child_process/exec and cloud-SDK fingerprints, gated behind native anti-analysis VM/sandbox detection, under a cover-story name — is the canonical shape of a staged credential-stealer that withholds its payload inside analysis environments. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/ebdb9b6adb47bd7606601457604aeb0706b205b4/osv/malicious/npm/tavern-ai-sdk/MAL-2026-20675.json))

Text from the GitHub Advisory record.

Recommendation

Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.

Affected

  • tavern-ai-sdknpm

    No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.