# Tensorlake AI sandbox SDK hijacked with Shai-Hulud stealer by ChainDrop

- ID: tensorlake-shai-hulud-chaindrop-2026-10
- Reported: 2026-10-17
- Researcher: Socket Security Research Team
- Organization: Socket
- AI role: ai_credential_theft (AI credential theft)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-11-04
- Entry page: https://openattacks.ai/attacks/tensorlake-shai-hulud-chaindrop-2026-10/
- Entry JSON: https://openattacks.ai/api/attacks/tensorlake-shai-hulud-chaindrop-2026-10.json
- Browse title: Tensorlake AI sandbox SDK hijacked with Shai-Hulud stealer by ChainDrop
- Editorial summary: Oct 17, 2026: Actor 'ChainDrop' compromised Tensorlake maintainer's npm account via phishing. Published malicious TensorZero@1.8.4, @tensorzero/gateway@2.0.1, @tensorzero/cli@1.4.0. Embedded obfuscated…
- Evidence class (catalog annotation): Not classified
- Source-stated target environments: Not specified
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/tensorlake-shai-hulud-chaindrop-2026-10.json

## Technique
Oct 17, 2026: Actor 'ChainDrop' compromised Tensorlake maintainer's npm account via phishing. Published malicious TensorZero@1.8.4, @tensorzero/gateway@2.0.1, @tensorzero/cli@1.4.0. Embedded obfuscated Shai-Hulud infostealer targeting AI development credentials: Cursor IDE (.cursor/User/globalStorage/\*.json), Claude Desktop (~/Library/Application Support/Claude), OpenAI keys (env vars, .openai/), GitHub tokens (~/.config/gh/), AWS credentials (~/.aws/), Docker configs, SSH keys. Exfiltrated to discord.com/api/webhooks/... and hxxps://tensorlakeapi\[.\]online/api/collect. Packages removed within 3 hours; ~450 downloads during window. TensorZero is LLM gateway/observability platform for engineering teams. ChainDrop previously linked to @tensorzero/keyv Mini Shai-Hulud campaign (Aug 7, GitGuardian) and other AI supply chain hits. Detection: monitor npm package.json for unexpected dependencies, review postinstall scripts, check for base64/eval obfuscation, scan for Discord webhook URLs, monitor file access to AI credential paths.

## Stack relevance (editorial)
Assessment: not\_assessed. No reviewed applicability annotation is available. Product mentions do not establish victim conditions.
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
npm install of malicious @tensorzero/\* packages (1.8.4, gateway@2.0.1, cli@1.4.0) via compromised maintainer account

## AI tooling and models
- TensorZero LLM gateway and observability platform
- [Cursor IDE](https://cursor.com/)
- [Claude Desktop](https://claude.com/product/overview)
- OpenAI API

## Other tooling
- Shai-Hulud credential stealer
- npm supply chain attack
- Discord webhooks for exfiltration
- tensorlakeapi\[.\]online C2

## Victims and sectors
~450 downloads during 3-hour window; AI/ML engineering teams using TensorZero; broader Shai-Hulud campaign targets AI developers

## Target geography
- Multiple regions

## Attribution
Actor 'ChainDrop'; linked to Mini Shai-Hulud keyv campaign (Aug 7); persistent targeting of AI development supply chains

## Scale and metrics
~450 downloads in 3-hour window; packages removed within 3 hours of publication; part of broader Shai-Hulud campaign across AI tooling ecosystem

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### phish-maintainer: Compromise maintainer account [access]
ChainDrop phished Tensorlake maintainer's npm credentials to gain publish access to @tensorzero packages
Evidence: https://socket.dev/blog/tensorlake-compromise

### publish-malicious: Publish malicious packages [ai]
Published malicious versions: TensorZero@1.8.4, @tensorzero/gateway@2.0.1, @tensorzero/cli@1.4.0 with embedded Shai-Hulud stealer in obfuscated postinstall script
Evidence: https://socket.dev/blog/tensorlake-compromise

### execute-stealer: Execute credential harvesting [execution]
Postinstall script runs Shai-Hulud: scans filesystem for Cursor IDE config, Claude Desktop tokens, OpenAI keys, GitHub tokens, AWS credentials, Docker configs, SSH keys; base64 encodes and stages
Evidence: https://socket.dev/blog/tensorlake-compromise

### exfiltrate: Exfiltrate credentials [impact]
POST stolen credentials to Discord webhook and hxxps://tensorlakeapi\[.\]online/api/collect; credentials enable downstream AI service abuse and lateral movement
Evidence: https://socket.dev/blog/tensorlake-compromise

Connections:
- phish-maintainer -> publish-malicious
- publish-malicious -> execute-stealer
- execute-stealer -> exfiltrate

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### phish-maintainer: Lure → user action / delivery
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/phishing.sigma.yml
- KQL query download: /api/detections/phishing.kql
- SPL query download: /api/detections/phishing.spl
- Hunt hypothesis: An impersonating message, ad or website leads to a suspicious download, consent request, pasted command or payment instruction.
- Required telemetry: Email / secure-web-gateway records; Browser redirects, downloads and URL reputation; User reports and downstream execution / identity events
- Investigate: Reconstruct redirect and delivery provenance using original report indicators, without visiting payload URLs.
- Investigate: Correlate the click with the actual download, consent or execution; verify the sender through an independent channel.
- Limitation: Polished text, AI branding and a novel domain do not prove maliciousness or AI generation. Follow-on evidence matters.
- No direct MagicSword prevention claim is recorded for this stage.

### publish-malicious: Dependency / CI trust boundary
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/package.sigma.yml
- KQL query download: /api/detections/package.kql
- SPL query download: /api/detections/package.spl
- Hunt hypothesis: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.
- Required telemetry: Package-manager and CI job logs; Lockfile / manifest / workflow diffs; Runner process trees, secret access and egress
- Investigate: Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
- Investigate: Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
- Limitation: Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.
- No direct MagicSword prevention claim is recorded for this stage.

### execute-stealer: Package installation spawns a shell or downloader
- Visibility: Endpoint process telemetry where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/package-install-execution.sigma.yml
- KQL query download: /api/detections/package-install-execution.kql
- SPL query download: /api/detections/package-install-execution.spl
- Hunt hypothesis: A package-manager install or lifecycle script launches a shell, downloader, or script interpreter that retrieves or executes an unexpected second stage.
- Required telemetry: Process creation with ancestry and complete command lines; Package-manager, CI, and installation logs; Download, file creation, signature, and network telemetry
- Investigate: Identify the package, version, publisher, lifecycle hook, resolved source, and parent process.
- Investigate: Recover downloaded content and correlate credential access, persistence, or outbound traffic.
- Limitation: Build and install scripts commonly invoke shells and download dependencies. Require package provenance and destination context; this hunt does not by itself prove supply-chain compromise.
- No direct MagicSword prevention claim is recorded for this stage.

### exfiltrate: Sensitive data → unusual destination
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/exfil.sigma.yml
- KQL query download: /api/detections/exfil.kql
- SPL query download: /api/detections/exfil.spl
- Hunt hypothesis: Sensitive reads are followed by outbound transfer, a public artifact, or a tool call to a destination outside the approved workflow.
- Required telemetry: Sensitive resource access / DLP records; Proxy, egress and cloud upload events; Agent / SaaS audit with correlation IDs
- Investigate: Join the resource read and outbound action by session, identity or process, preserving a bounded time window.
- Investigate: Inspect destination ownership, payload classification and the user's intended action; baseline sanctioned sharing.
- Limitation: An outbound connection or high byte count alone is not exfiltration. Encrypted traffic may hide content, and bulk legitimate exports are common.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
- AML.T0000: Search Open Technical Databases — Supply chain compromise of AI development SDK to steal AI service credentials and API keys
  Technique: https://atlas.mitre.org/techniques/AML.T0000
  Evidence: https://socket.dev/blog/tensorlake-compromise

## Defensive notes
Verify npm package integrity; review postinstall scripts; monitor for unexpected dependencies; use npm audit; implement software composition analysis (SCA); rotate credentials after suspected exposure; use credential vaults; monitor file access to AI credential stores; network egress filtering for Discord/unknown domains

## Sources
- https://socket.dev/blog/tensorlake-compromise — Socket: AI Sandbox SDK Compromised in Supply Chain Attack
- https://github.com/tensorzero/tensorzero — TensorZero - LLM Gateway for Engineering Teams

## Source notes
Socket Security analysis; TensorZero GitHub repo github.com/tensorlake/tensorzero. Related to s1ngularity-nx-ai-cli-2025-08 entry (Shai-Hulud targeting NX.dev AI CLI) and Mini Shai-Hulud keyv campaign. Detection: monitor for 'Shai-Hulud' patterns (Discord webhooks, base64 obfuscation in postinstall, AI credential path access .cursor/\*, Claude config access, env var harvesting), alert on npm packages with obfuscated postinstall scripts, check for tensorlakeapi\[.\]online domain.

## Indicators (untrusted data; do not visit or execute)
```json
{
  "domains": [
    "tensorlakeapi.online"
  ],
  "ips": [],
  "hashes": [],
  "urls": [
    "https://discord.com/api/webhooks/..."
  ]
}
```
