Abbi Labs

Breach breakdowns

Breakdown: Google says attackers edited .claude/settings.json so starting Claude Code pulled a backdoor, and stolen AI keys ran up $100,000 in a day

By Abbi Labs · Published 26 November 2026

Is an AI key sitting in your live site?

The Abbi Labs quick check opens your live, public site as a signed-out visitor and looks for secret-looking keys in its JavaScript (OpenAI, Anthropic, Stripe and others), exposed .env and .git files, and Supabase tables readable with your public key. It can't see your repos, your laptop or your agent settings, so do the repo checks below yourself. No sign-up.

No app handy?

Example result · our deliberately broken demo app

6 issues found: 3 critical, 1 high, 1 medium, 1 low

  • Critical: Stripe live secret key in public JavaScript
  • Critical: /.env file readable by anyone
  • High: Git repository exposed (/.git/HEAD)

The demo's problems are planted on purpose. Paste your own URL above to see yours.

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.

On 16 November 2026, Google Threat Intelligence Group (GTIG) published its latest AI Threat Tracker, written with Mandiant. Most of it is about how attackers use AI. One paragraph is about how they abuse the AI tools developers already run. In intrusions at cryptocurrency companies in North America and Europe, a suspected North Korean cluster Google tracks as MIDNIGHT NEPTUNE got into internal code repositories and edited .claude/settings.json. After that, when people started Claude Code in those repos, it downloaded a backdoor Google calls SOMBERMEME.

The same report has two more things anyone shipping with AI should know. Stolen AI and cloud credentials ran up bills over $100,000 in a single day. And Google found an attacker's agent that compares software before and after a security patch, writes the exploit and runs it with no human involved.

Everything below comes from Google's report unless I say otherwise. Claude Code behaviour is from Anthropic's own docs. Where something isn't public, I say so.

What happened

Why a settings file can do this

Per Anthropic's docs, .claude/settings.json is the shared project settings file, the one meant to be checked into source control. It can hold hooks, which are shell commands Claude Code runs on events such as SessionStart (when a session begins or resumes). So a commit to that file is a commit that decides what runs on every teammate's machine.

Claude Code does hold back hooks until you accept the workspace trust dialog for a folder. That helps with a stranger's repo. It doesn't help here, because people had already trusted their own company's repo. And the docs say that in -p or SDK sessions the dialog never appears and the folder is treated as trusted, so hooks committed in a repo's .claude/settings.json run there too. Google's report doesn't say which setting the actor used, a hook or something else.

The numbers

The other two findings

What's confirmed and what we don't know

How to check your own repos

Do this in every repo where you or a teammate run Claude Code. It takes a few minutes.

  1. See who changed the shared settings file, and when.
    git log --all --format='%h %an %ad %s' -- .claude/settings.json .claude/settings.local.json
    Any commit you can't explain, open it with git show <hash>.
  2. Read what it runs right now. Look for a hooks block, env, apiKeyHelper or anything that calls a command:
    grep -nE '"(hooks|SessionStart|command|env|apiKeyHelper)"' .claude/settings.json
    grep -nEi 'curl|wget|base64|bash -c|sh -c|powershell|https?://' .claude/settings.json
    A hook that downloads something, decodes a blob or pipes into a shell needs a reason you understand.
  3. Check your tokens. In GitHub, Settings, Developer settings, Personal access tokens. Delete any token you don't recognise, especially ones named after a tool. If you run an org, review the org's token list too.
  4. If you script Claude Code with -p in CI or with the SDK, remember repo hooks run without the trust prompt. Anthropic's docs suggest reviewing .claude/ first, or turning hooks off for that run:
    claude -p "..." --settings '{"disableAllHooks": true}'

How to check your AI keys

  1. Set a hard spend limit on every AI and cloud key, plus a usage alert. A $100,000 day only happens when nothing stops it.
  2. Make sure no AI key ships to the browser. Open your live site, DevTools, Sources, and search for sk-, sk-ant- and AIza. If one is there, rotate it first. See AI API key exposed in your frontend.
  3. Search your git history, not just the current code. Google names public GitHub repos as a source of stolen credentials, and old commits count. See secret keys in git history.
  4. If you run LiteLLM, update past CVE-2026-40217 and watch for new admin keys or service accounts you didn't create.

Check the side strangers can already see

An attacker needed a way into those repos. A key in your live JavaScript needs nothing, anyone can open it. Paste your URL and Abbi Labs checks what a signed-out visitor can see: secret-looking keys in your JavaScript, exposed .env and .git, open Supabase tables. Read-only.

Run a free scan

How to make this harder next time

  1. Review .claude/ like you review CI workflows. Add it to CODEOWNERS so a change needs a named reviewer. A settings file that runs commands on every laptop deserves the same care as a GitHub Actions file.
  2. Do the same for the other agent files. CLAUDE.md, AGENTS.md, .mcp.json, .cursor/ rules and .vscode/tasks.json can all lead to commands running.
  3. If you manage a team, Anthropic's docs describe allowManagedHooksOnly in managed settings, which blocks user, project and local hooks so only the ones you approve run.
  4. Use short-lived, narrow tokens. A fine-grained token that expires can't be quietly reused for months.
  5. Treat "run this fix" requests as hostile. A recruiter or meeting page that asks you to paste a command into your terminal is the lure Google describes.
  6. Patch the public stuff fast. If a tool can turn a patch into a working exploit on its own, waiting a few weeks to update a plugin is a bigger risk than it used to be.

My take

The interesting part isn't North Korea. It's that the attacker didn't need anything special once they were in. They edited a JSON file that everyone on the team had already agreed to trust, and the coding tool did the rest. If your repo has a .claude folder, it's code. Read it, review changes to it, and keep a spend limit on every AI key so a stolen one costs you an alert instead of a month's revenue.

Scan your live app free

Sources

Related

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.