# Claude Code extension detection pack v1.1.0: trojanised Anthropic.claude-code 2.1.312 and 2.1.313 (Cursor marketplace, 29 Oct 2026)

Read-only checkers and hunting content for a supply-chain compromise (no CVE). Maliciously modified builds of Anthropic's Claude Code VS Code extension, `Anthropic.claude-code` versions **2.1.312 and 2.1.313**, not built by Anthropic, were served by Cursor's VS Code extension marketplace on 29 October 2026. They plant an attacker SSH key, install persistence, try to open a reverse SSH tunnel and beacon host details. Refreshed 15 November 2026 against Cursor's revised security notice, Cursor's incident update, Open VSX, Microsoft's advisory as operator of the Visual Studio Marketplace, Anthropic's GitHub advisories and news reporting. This pack replaces the 2.1.313-only pack (v1.0.0, folder `claude-code-ext-2.1.313/`, left unchanged).

**The KQL in this pack has NOT been run against a live tenant.** It passes an offline Kusto.Language parse against an assumed schema subset. Sigma rules pass `sigma check` and convert to KQL; checkers and tests run offline.

Labels used throughout: **VENDOR IOC** is an indicator published by Cursor (or by Microsoft as Visual Studio Marketplace operator, where marked). **OUR PATTERN** is CybaVerse hunting logic built on those indicators. **OUR ADVICE** is CybaVerse guidance, not vendor guidance.

## Is 2.1.312 malicious? Which source confirms which version

Verdict: **yes. Cursor, the marketplace operator that served the builds, confirms both 2.1.312 and 2.1.313** in its revised security notice and again in its 13 November incident update, and publishes separate hashes for each. Microsoft (Visual Studio Marketplace operator) repeats both versions. BleepingComputer reports both. Anthropic has published no advisory of its own.

| Source (type) | When (GMT) | 2.1.312 | 2.1.313 | Exact words |
|---|---|---|---|---|
| Cursor security notice, original (primary) | 29 Oct 2026 (archived copy 30 Oct 08:43) | not named | **confirmed** | Title: "malicious version of Anthropic.claude-code (2.1.313) identified in the Cursor Extension Marketplace" |
| Cursor security notice, revised (primary) | "Update: Oct 30, 2026, 11:30 am PT" = 30 Oct 2026 18:30 | **confirmed** | **confirmed** | "Anthropic.claude-code version 2.1.312 and 2.1.313 for Windows and MacOS. These malicious versions of the extension were not developed by Anthropic." and "We updated the IOCs and clarified affected versions." |
| Cursor, "An update on our recent security incident" (primary) | 13 Nov 2026 | **confirmed** | **confirmed** | "If customers installed or updated to tampered version Anthropic.claude-code 2.1.312 or 2.1.313 from the Cursor VS Code extension marketplace during the exposure window, we ask customers to follow the steps in our security notice." |
| Microsoft, Visual Studio Marketplace operator (primary for that marketplace) | 30 Oct 2026 | repeats Cursor | repeats Cursor | "a tampered copy of Claude Code extension (anthropic.claude-code, versions 2.1.313 and 2.1.312) was available and served in the Cursor extension marketplace"; "the malicious packages found on Cursor marketplace were never published nor distributed from Microsoft Visual Studio Marketplace and from npm @anthropic-ai/claude-code" |
| Open VSX registry API (primary, registry data) | checked 15 Nov 2026 | genuine 2.1.312 exists, published 27 Oct 2026 20:26 | not listed | Version list runs 2.1.311, 2.1.312, 2.1.314: 2.1.313 was never published there |
| Anthropic | checked 15 Nov 2026 | no statement on versions | no statement on versions | No advisory in `anthropics/claude-code` GitHub security advisories. News (WIRED, The Next Web) quotes an Anthropic engineer on X: "A malicious actor used access to Cursor's marketplace to publish a tampered copy of the Claude Code extension, which we didn't build or publish." Not verified at source; names no version |
| BleepingComputer (news) | 14 Nov 2026, 12:27 PM US Eastern = 17:27 | reported | reported | "The malicious extensions, versions 2.1.312 and 2.1.313, were available for approximately 11 hours before Cursor removed them." |

Important: a **genuine** 2.1.312 also exists (Open VSX, the VS Code Marketplace and npm). Cursor's finding concerns the modified builds its marketplace served in the window. A 2.1.312 folder on its own is therefore not proof; 2.1.313 is, because Anthropic never published it.

## Status at a glance (checked 15 Nov 2026)

| Item | Status | Source |
|---|---|---|
| What | Malicious `Anthropic.claude-code` 2.1.312 and 2.1.313 (darwin-arm64, win32-x64), "not developed by Anthropic", served by the Cursor VS Code extension marketplace | Cursor notice (revised) |
| How | "using a stolen credential from the exposed data from our internal system, the attacker placed malicious, unauthorized copies of Anthropic's Claude Code extension directly on the cache used to serve the Cursor VS Code extension marketplace" | Cursor incident update, 13 Nov 2026 |
| Window | 29 Oct 2026, "about 2:27am PT and 1:35pm PT" = **09:27 to 20:35 GMT** (US on PDT, UTC-7; UK on GMT) | Cursor |
| Scale | "At most 5,000 users who requested specific cached versions of the extension on October 29 potentially received the malicious build" | Cursor incident update |
| Open VSX | "The marketplace source, Open VSX, never had the malware." | Cursor incident update; Open VSX API |
| Containment | "We believe the incident is contained. The last attacker activity we have seen was on November 1, and it was blocked." | Cursor incident update |
| Attacker server | Taken offline with the hosting provider; tunnel and beacon "not functional" | Cursor notice |
| Fixed version | **2.1.314** (Open VSX 30 Oct 2026 01:07 GMT) | Open VSX API |
| Remediation scripts | Cursor: `remediate-macos.sh` (run as the user, not root) and `remediate-windows.ps1` (elevated). **No Linux script is published** | Cursor notice |
| CVE / KEV | No CVE has been assigned, so there is no CISA KEV entry and BOD 26-04 does not apply | |

## Confirmed vs unverified

**Confirmed by Cursor (primary source, revised notice):**

- Collects hostname, username, OS, architecture, home directory, environment variable **names**, working directories, configured Git email and public IP.
- Appends an attacker key labelled `svc-telemetry` to `authorized_keys`; tries to enable the local SSH service and open a reverse SSH tunnel. Outside "highly unusual circumstances where Cursor was started with administrator privileges, due to errors in the malicious code, this step would fail". The key, persistence and beacon still happen.
- Persistence: LaunchAgent (macOS); scheduled task trying to run as SYSTEM with a Startup-script fallback (Windows); **Linux: cron `@reboot /bin/sh "<HOME>/.config/.smt"`** (new in the revision, v1.1.0). Background scripts retry the tunnel about every 60 seconds.
- Beacon: HTTP POST to `/beacon` on port 8099. "Uninstalling the extension may not be sufficient".

**Confirmed by Microsoft (Visual Studio Marketplace operator), not stated by Cursor:** the loader keeps "up to forty" environment-variable names containing KEY, TOKEN, SECRET, PASS, AWS or GCP, and sends names, not values; on Unix-like systems it prefers `autossh` and falls back to `ssh`, on Windows it uses a hidden PowerShell loop; the decoded tunnel private-key file hash (below).

**News or public research only (NOT confirmed by Cursor, Microsoft or Anthropic):**

- Auto-update could have pulled the malicious build without the user acting (security researchers quoted by The Hacker News). Plausible, not stated by Cursor.
- A 66-line loader inserted before the legitimate code; activation at startup and when the webview opens (The Hacker News, quoting security researchers).
- "No other follow-on payloads observed" (The Hacker News).
- Security researchers found coding errors that likely stopped the backdoor on many Windows and macOS systems where SSH was not already enabled (BleepingComputer). Consistent with Cursor's own wording above.

## Indicators (VENDOR IOC unless marked)

Defanged in Cursor's notice; shown live here only inside code spans for copy and paste into tools.

**Package version 2.1.312 (Cursor, revised notice):**

| Platform | VSIX SHA-256 | MD5 |
|---|---|---|
| darwin-arm64 | `fcbb327e38e61c4fec795e0d0591f52cd1014b813d20a5912104953c3a17c364` | `e0d64d53e802a0217ba6f0e656ed2f20` |
| win32-x64 | `3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081` | `bd3b71ddf3d0cc3af76249afd2c0eda1` |

**Package version 2.1.313 (Cursor, revised notice):**

| Platform | VSIX SHA-256 | MD5 |
|---|---|---|
| darwin-arm64 | `80402fdcad8799285fd93044976973ca000da7995fb93363f819bb8e4f84ee6c` | `34e491161e056c9b899a79b602ac73b9` |
| win32-x64 | `6786ec90cbd45949695bd7805c9fbb26cfc91bc5fc897de0183d9bcb9cb21731` | `7838a3be2ca0ff08c1bdb160ef516d39` |

**Hash changes since v1.0.0 (read this if you used the old pack):** Cursor's first notice listed only 2.1.313, with darwin-arm64 `432ccdee3801f99e52b8fe31f69ea9870118e96ea7ef9ecabed1479621b5ab62` (MD5 `da5469c4221775e9fe2e413e59ca7fd9`) and win32-x64 `3de1722901165769893bef57c72594e9a54459faa23f3091b136b79966edd081`. In the 30 Oct revision, `3de17229...` is listed under **2.1.312** win32-x64, 2.1.313 has the two new hashes above, and `432ccdee...` **is no longer listed at all**. This pack keeps `432ccdee...` as a WITHDRAWN, low-confidence lead (KQL Q8 and Q10 label it) and does not treat it as confirmed.

**Payload (both versions, both platforms):**

| Type | Value | Source |
|---|---|---|
| Modified code | `extension.js` "in package versions 2.1.312 and 2.1.313 for both Darwin and Windows in the extension folder contains 134[.]209[.]82[.]225 and svc-telemetry" | Cursor |
| extension.js SHA-256 | `ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15` (MD5 `f49bcd657ef1e626e85ce858958c1769`) | Cursor (Microsoft lists the same SHA-256) |
| Decoded tunnel private-key file SHA-256 | `7e0a52885fadee05544a9e99eb18c792bec05900a5e1a66d68f8383decb0e278` | Microsoft only (VENDOR IOC, Visual Studio Marketplace operator); not in Cursor's notice |

**Network, SSH, files and commands (Cursor):**

| Type | Value |
|---|---|
| Attacker IP | 134[.]209[.]82[.]225 |
| Reverse SSH | tunnel@134[.]209[.]82[.]225, TCP 22 |
| Beacon | hxxp://134[.]209[.]82[.]225:8099/beacon (POST); loopback attempt 127[.]0[.]0[.]1:8099/beacon |
| Public IP lookups | ifconfig[.]me, api[.]ipify[.]org (legitimate; not an indicator alone) |
| Key | `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdvylCEJ/k2TpezcTfedrkHyFSK9IZ3vmP6vhY4Ss0P svc-telemetry` |
| Key fingerprints | planted key `SHA256:0Z6R+DF64Do2nwQic8a7kkfDLNNk4IiK+2U2Rci4htk`; reverse-tunnel key `SHA256:KOAU57+ZG6u3MG4WwzPzPX2O5YEe9qdOC1Bl+6MVyDQ` |
| Linux and macOS files | key in `~/.ssh/authorized_keys`; `~/.config/.smt`, `~/.config/.smtk` |
| Linux | `/tmp/.stk_<10 hex>`; cron `@reboot /bin/sh "<HOME>/.config/.smt"` (new in the revision) |
| macOS | `$TMPDIR/.stk_<10 hex>`; `~/Library/LaunchAgents/com.apple.sysmond.plist` (label `com.apple.sysmond`) |
| Windows | `%USERPROFILE%\.ssh\authorized_keys`; `%USERPROFILE%\.config\smt.cmd`, `smtk`; `%TEMP%\.stk_<10 hex>`; task `SysMon` (tries to run as SYSTEM); fallback `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\sysmon.cmd`. Cursor's Windows check also reads `C:\ProgramData\ssh\administrators_authorized_keys` |
| Commands | `ssh -N -R '*:0:localhost:22'`, `autossh -M 0`; options `StrictHostKeyChecking=no`, `UserKnownHostsFile=/dev/null`, `ServerAliveInterval=30`, `ServerAliveCountMax=3`, `ExitOnForwardFailure=yes`, `IdentitiesOnly=yes`; `schtasks /create /tn SysMon`; `systemsetup -setremotelogin on`; `Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0` |

No domains other than the legitimate IP lookup services are published by any source.

## Who is affected

Anyone who installed or auto-updated `Anthropic.claude-code` to 2.1.312 or 2.1.313 **from Cursor** between 09:27 and 20:35 GMT on 29 Oct 2026. Cursor names macOS (darwin-arm64) and Windows (win32-x64) builds; its revised notice also lists Linux file and cron indicators. VS Code users who pull from the Microsoft Visual Studio Marketplace are not affected according to Microsoft, but check anyway: profiles get synced and copied, and Windsurf or VSCodium style editors sometimes share extension folders (OUR ADVICE).

## Timeline (GMT)

| When | What | Source |
|---|---|---|
| 27 Oct 2026 20:26 | Genuine 2.1.312 published on Open VSX | Open VSX API |
| 29 Oct 2026 about 09:27 | Malicious builds available on Cursor's marketplace | Cursor |
| 29 Oct 2026 about 20:35 | Removed; marketplace shut down, rebuilt, keys rotated | Cursor |
| 29 Oct 2026 | Cursor security notice published, naming 2.1.313 only | Cursor (archived copy, 30 Oct 08:43) |
| 30 Oct 2026 01:07 | 2.1.314 on Open VSX | Open VSX API |
| 30 Oct 2026 | Microsoft advisory naming 2.1.313 and 2.1.312 | Microsoft |
| 30 Oct 2026 18:30 | Cursor revises the notice: 2.1.312 and 2.1.313, new hashes, Linux indicators | Cursor ("Oct 30, 2026, 11:30 am PT") |
| 1 Nov 2026 | Last attacker activity seen by Cursor, blocked | Cursor incident update |
| 13 Nov 2026 | Cursor incident update | Cursor |
| 14 Nov 2026 17:27 | BleepingComputer report | BleepingComputer |

## OUR ADVICE: proactive steps

1. **Inventory editors and extensions** on every managed device: Cursor, VS Code, VS Code Insiders, Windsurf, VSCodium, remote and server installs (`~/.vscode-server`, `~/.cursor-server`). Run the checkers with `--all-users` / `-AllUsers`, and KQL Q8 and Q12.
2. **Update** `Anthropic.claude-code` to **2.1.314 or later** everywhere.
3. **Block 134[.]209[.]82[.]225** at firewalls, proxies and Defender for Endpoint (custom network indicator), inbound and outbound, and alert on hits. The host is offline now but the address may be reused.
4. **Add the published hashes** (both versions, the payload `extension.js` and the tunnel key file) as file indicators where your EDR supports them.
5. **Allow-list extensions** on managed devices and pin versions for AI coding extensions; **disable extension auto-update** for them and stage updates after a short delay.
6. **Review outbound TCP 22** from user endpoints. Most laptops only need it to known Git hosts; deny the rest.
7. Make sure Remote Login (macOS), OpenSSH Server (Windows) and sshd (Linux desktops) are off where not needed, and that users are not local admins by default.

## OUR ADVICE: reactive steps

Look for (checkers plus KQL):

1. **The key**: `svc-telemetry` or the published key blob in any `authorized_keys` or `C:\ProgramData\ssh\administrators_authorized_keys` (checkers; KQL Q6).
2. **The builds**: any 2.1.313 folder; any 2.1.312 folder whose `extension.js` contains the IOCs or matches the payload hash; any 2.1.312 under Cursor's folders unpacked inside the window (checkers; KQL Q8, Q10, Q12; Sigma folder rules).
3. **Persistence**: `com.apple.sysmond` LaunchAgent, `.smt` / `.smtk` / `smt.cmd` / `smtk`, `.stk_<10 hex>`, task `SysMon`, Startup `sysmon.cmd`, the Linux `@reboot` cron entry (checkers; KQL Q5, Q6, Q7, Q11; Sigma file and process rules).
4. **Connections**: anything to the attacker IP (any port), port 8099, and unusual outbound 22 (KQL Q1, Q2, Q9; Sigma network and proxy rules).
5. **Tunnel processes**: `ssh -R` / `autossh -M 0` with the published options, retrying about every 60 seconds (checkers; KQL Q3, Q4).

If you find any:

- **Isolate** the device; do not wipe it.
- **Preserve evidence**: copies of `authorized_keys`, the LaunchAgent / task / Startup script / cron spool, `~/.config`, temp `.stk_*` files, the extension folder, editor logs, and a triage image.
- **Remove** with Cursor's scripts from the [security notice](https://cursor.com/blog/claude-code-extension-security-notice): `remediate-macos.sh` as the affected user, `remediate-windows.ps1` elevated. They exit non-zero if anything remains. For Linux there is no Cursor script: remove the key, the `@reboot` cron entry, the files and processes by hand using the indicators above, and record what you removed.
- **Uninstalling the extension is not enough**: the payload drops standalone scripts that keep running.
- **Consider a rebuild**, especially where SSH was actually enabled (admin-started editors, hosts with sshd running) since the attacker may have logged in.
- **Rotate credentials and sessions** reachable from the host from a trusted machine. Cursor: "The limited env-var collection does not rule out later credential access over the backdoor."

## Patched does not mean clean

Updating to 2.1.314 replaces the extension code; it does not remove the planted key, the LaunchAgent / task / Startup script / cron entry, the `.smt` loops or the tunnel key files. Every device that had a malicious 2.1.312 or 2.1.313 must be checked and cleaned, whatever version it runs now.

## Files

| Path | What it is |
|---|---|
| `scripts/check-claude-code-ext.sh` | Bash checker for macOS and Linux (bash 3.2+). Read-only and offline |
| `scripts/Check-ClaudeCodeExt.ps1` | PowerShell checker for Windows (PowerShell 5.1 and 7). Read-only and offline |
| `kql/claude-code-ext-hunting.kql` | Defender XDR / Sentinel hunting queries Q1 to Q12, each labelled VENDOR IOC or OUR PATTERN |
| `sigma/*.yml` | 11 Sigma rules, each labelled VENDOR IOC or OUR PATTERN in its description |
| `sigma/converted/kusto_*.txt` | Sigma converted to KQL for no pipeline, `microsoft_xdr`, `microsoft_365_defender`, `sentinel_asim` and `azure_monitor` (NOT run against a live tenant) |
| `tests/run_all.sh` | Runs every gate (see Tests) |
| `tests/run_tests.sh`, `tests/Check-ClaudeCodeExt.Tests.ps1`, `tests/kql_parse.ps1` | Bash cases, Pester suite with bash parity, offline KQL parse |
| `CHANGELOG.md` | Version history |

## Checker usage

Both checkers are **strictly read-only and offline**: they list folders, read files, hash `extension.js` (`sha256sum` or `shasum`, `Get-FileHash`) and list processes (and, on Windows, read scheduled tasks with `Get-ScheduledTask`). They never connect to the attacker IP or anywhere else, never write, move or delete anything, never remove keys, tasks, cron entries or LaunchAgents, and never run Cursor's remediation scripts. They never print key material: `.smt`, `.smtk`, `smtk` and `.stk_*` files are checked by name only, extension code and Startup scripts are reported by line number only, and any other matched line is cut short with long base64 runs shown as `[REDACTED]`.

```bash
bash scripts/check-claude-code-ext.sh                 # current user
sudo bash scripts/check-claude-code-ext.sh --all-users # every home under /Users and /home, plus /root
bash scripts/check-claude-code-ext.sh --home /mnt/image/Users/alice --ps-file ./ps.txt --cron-dir /mnt/image/var/spool/cron
```

```powershell
powershell -ExecutionPolicy Bypass -File .\Check-ClaudeCodeExt.ps1            # current user
powershell -ExecutionPolicy Bypass -File .\Check-ClaudeCodeExt.ps1 -AllUsers  # elevated: every profile in C:\Users
.\Check-ClaudeCodeExt.ps1 -HomeDir D:\image\Users\alice -ProgramDataSsh D:\image\ProgramData\ssh -TaskFile .\tasks.txt -ProcessFile .\procs.txt
```

Version logic (VENDOR IOC for the versions, OUR PATTERN for the 2.1.312 handling):

| Found | Result |
|---|---|
| any `anthropic.claude-code-2.1.313*` folder, any editor | INDICATOR |
| 2.1.312 whose `extension.js` contains the IOCs or matches the payload SHA-256 | INDICATOR ("malicious 2.1.312 build") |
| 2.1.312 under `.cursor` or `.cursor-server` with no IOC in `extension.js` | REVIEW (check install time and VSIX hash) |
| 2.1.312 in any other editor with no IOC | CLEAN, with a note that a genuine 2.1.312 exists |
| any version whose `extension.js` matches the payload SHA-256 | INDICATOR |

| Verdict | Exit |
|---|---|
| CLEAN | 0 |
| INDICATORS FOUND | 1 |
| UNKNOWN (a location could not be read; re-run as root / elevated) | 2 |
| error (bad arguments, missing paths) | 3 |
| REVIEW (new in v1.1.0: 2.1.312 from Cursor with no IOC found) | 4 |

Precedence: INDICATORS FOUND, then REVIEW, then UNKNOWN, then CLEAN. Both checkers print OUR ADVICE to update to 2.1.314+ and use Cursor's removal scripts. `CHECK_TEST_PAYLOAD_SHA256` is a test hook only (it adds one extra hash to match, because the tests cannot ship the real payload).

## Tests

`bash tests/run_all.sh` runs every gate and stops on the first failure: ShellCheck; PSScriptAnalyzer; the bash cases (verdicts, 2.1.312 handling, payload hash via the test hook, secret redaction, negative near-miss cases, FIXTURE_ONLY and RFC 5737 fixture checks, bwrap runs of both checkers with no network and a read-only file system, sha256 of the fixture tree before and after); the Pester suite, including a parity block that runs the bash checker on the same trees and requires the same exit code and verdict; static guards against network, write and exec primitives in the checkers; wording guards (no em or en dashes, no banned names, labels present, attribution, only the current CISA directive BOD 26-04); IOC consistency across README, KQL, Sigma and both checkers; the offline Kusto.Language parse of every KQL query (with negative parse tests); `sigma check`; Sigma conversion for each pipeline compared with `sigma/converted/` (`REGEN=1` rewrites them). Tools are expected under `~/tools`.

Documented Sigma conversion gaps: the proxy rule has no table in `microsoft_xdr`, `microsoft_365_defender` or `azure_monitor` (use KQL Q9); the macOS and Linux editor persistence rules have no `azure_monitor` mapping (it maps process creation to the Windows SecurityEvent table, which has no parent command line). Every other rule and pipeline pair converts.

## Sources

- Cursor, "Security notice: malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) identified in the Cursor VS Code Extension Marketplace", 29 Oct 2026, revised 30 Oct 2026 18:30 GMT: https://cursor.com/blog/claude-code-extension-security-notice (primary; versions, IOCs and remediation scripts)
- Cursor, "An update on our recent security incident", 13 Nov 2026: https://cursor.com/blog/security-incident-update (primary)
- Open VSX, Anthropic.claude-code: https://open-vsx.org/extension/Anthropic/claude-code and https://open-vsx.org/api/Anthropic/claude-code (registry data)
- Microsoft, Visual Studio Marketplace operator, "Inside a malicious Claude Code-branded extension and its persistent SSH backdoor", 30 Oct 2026: https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/
- Anthropic, Claude Code security advisories (none for this incident as of 15 Nov 2026): https://github.com/anthropics/claude-code/security/advisories
- BleepingComputer, "Cursor confirms security breach led to malicious Claude Code extension", 14 Nov 2026: https://www.bleepingcomputer.com/news/security/cursor-confirms-security-breach-led-to-malicious-claude-code-extension/ (news)
- The Hacker News, "Official Claude Code VS Code Extension Compromised to Install Persistent SSH Backdoor", 30 Oct 2026: https://thehackernews.com/2026/10/official-claude-code-vs-code-extension.html (news)
- WIRED and The Next Web (news) for the quoted Anthropic statement on X, not verified at source
