MAL-2026-20675: Malicious code in tavern-ai-sdk (npm)

Published Nov 27, 2026
·
Updated

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

Source: amazon-inspector (d9bd39419e14e3d9a7746b88d0724cf25261deca2acb64a7daa2ba5f5c504868) 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, childprocess, 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 childprocess/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.

Affected Software

1 affected component
npm/tavern-ai-sdk=1.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Operational

    Restore from package-lock if corrupted.

Event History

Nov 27, 2026
Advisory Published
via OSV·12:16 AM
Data Sourced
via OSV·12:16 AM
DescriptionAffected Software

Frequently Asked Questions

1

What action triggers the suspicious code?

The package's main entry, personas.mjs, statically imports cache-warm.mjs. As a result, the obfuscated code runs when an application loads tavern-ai-sdk with require('tavern-ai-sdk').

2

Who is exposed to this package?

Any application or environment that loads the npm package is exposed to execution of its bundled obfuscated JavaScript. The package also includes native binaries for Linux, macOS, and Windows on arm64 and x64.

3

What capabilities does the bundled code appear to have?

The obfuscated bundles reference createRequire, child_process, spawn, exec, and AWS-prefixed strings, creating a potential code-execution and cloud-credential access surface. The included native components also probe for virtual machines, containers, sandboxes, and cloud environments.

4

How can I identify a potentially affected installation?

Check whether tavern-ai-sdk is present and whether its installed package contains cache-warm.mjs, build-cache.mjs, cache-sweep.mjs, workspaces.js, or native/*/*/cache-probe.node. Loading the package's main entry triggers the static import of cache-warm.mjs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203