Stolen AI API Keys Now Pay for Hacking Scans: How to Lock Down Your OpenAI, Anthropic and Gemini Keys

Bitsight found a criminal tool, MONST3R-AI, that runs autonomous pentest scans on stolen OpenAI, Anthropic and Google keys while victims pay the bill. How keys leak, how to spot abuse, and the controls each provider offers today.

Medy Evrard

28 October 2026

Stolen AI API Keys Now Pay for Hacking Scans: How to Lock Down Your OpenAI, Anthropic and Gemini Keys

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Stolen AI API keys now pay for other people’s hacking. In October 2026, Bitsight’s threat intelligence team described MONST3R-AI, a tool sold on a criminal forum that runs autonomous penetration-testing scans on stolen OpenAI, Anthropic and Google keys. The buyer brings the key, the agent does the scanning, and the key’s owner gets the bill. This guide covers how keys leak, how to spot abuse, and the controls each provider offers today.

To protect an OpenAI, Anthropic or Gemini key, scope it to one project or workspace, set a hard monthly spend cap, restrict where it can be called from, set an expiry or rotate it, keep it out of client code and repos, and turn on secret scanning with push protection. If a key leaks, create a replacement, deploy it, then disable the old one and audit usage.

What is LLMjacking?

LLMjacking is the abuse of a stolen large language model credential, usually an API key, to run inference that the key’s owner pays for. Attackers resell the access, burn it on their own workloads, or now, according to Bitsight, use it to power autonomous attack agents. The victim sees the activity only as billable usage on their own account.

What Bitsight found about MONST3R-AI

The facts below come from coverage of Bitsight’s research by Help Net Security and AI Weekly, published October 17, 2026. Bitsight’s own write-up of the tool was not public when this article was written.

MONST3R-AI billing flow: a stolen key pays for the scan

A leaked key is no longer just a surprise invoice. It can fund someone else’s attack campaign, and every request looks like your normal traffic.

How AI API keys leak

Most stolen keys were never “hacked.” They were published by accident. The common paths:

Leak path How it happens Fix
Public repos Key committed in code, .env or a notebook Secret scanning with push protection
Client-side code Key shipped in a web bundle or mobile app Call the model from your backend only
CI logs A build step echoes env vars or debug output Mask secrets, never set -x around them
Container images .env copied into an image layer .dockerignore, inject at runtime
Agent and MCP configs Key pasted into an MCP server config or agent settings file, then synced or shared Reference env vars, not literal keys
Chat and tickets Key pasted into Slack, an issue or a support ticket Rotate any key that left your secret store

Google’s Gemini API key guide states the client-side rule plainly: keys compiled into web or mobile apps can be extracted by users, so run a backend proxy that makes the real calls. Our guide to storing API keys covers the storage side in more depth.

Agent configs deserve extra care: MCP and agent settings files end up in dotfile repos, screen shares and bug reports.

How to tell your key is being abused

No alert says “a criminal is using this.” Watch usage and billing data for:

  1. Spend jumps with no deploy behind them. A flat daily cost that doubles overnight is the clearest sign.
  2. Models you don’t use. Usage on a model family your product never calls.
  3. Off-hours traffic. Steady requests at 3 a.m. in your time zone from a key used by a daytime app.
  4. Rate-limit errors you didn’t cause. Someone else is consuming your per-minute quota.
  5. Unknown keys or projects on usage pages. Google AI Studio’s Usage page groups requests it can’t match to a named key under “(unknown keys).”

Split keys finely enough that one spike points at one key.

How to protect your OpenAI API key

Checked October 28, 2026 against OpenAI’s developer docs.

See our OpenAI API key guide.

How to protect your Anthropic API key

Checked October 28, 2026 against the Claude Platform docs.

See our Anthropic API key guide.

How to protect your Google Gemini API key

Checked October 28, 2026 against Google’s Gemini API key docs and billing docs.

Key controls compared: OpenAI, Anthropic, Gemini

The lockdown checklist for every provider

Run this once per key you own:

  1. Inventory. List every key, the app that uses it and where it’s stored.
  2. Split. One project or workspace per app and environment, so a spike names its source.
  3. Cap. Set a hard monthly limit and an earlier alert.
  4. Restrict. IP allowlist or application restriction wherever your egress is fixed.
  5. Expire or rotate. Short expiry where the provider supports it; a rotation schedule where it doesn’t.
  6. Scan. GitHub’s secret scanning patterns include OpenAI, Anthropic and Google Gemini API keys, and OpenAI keys support push protection. Our post on checking for leaked API keys covers scanners you can run locally.
  7. Prefer short-lived credentials. Anthropic and OpenAI both document workload identity federation for production.

For the policy side, see API key management best practices.

What to do in the first hour after a leak

Speed beats root cause. In order:

First hour after an AI API key leak
  1. Create a replacement key in a fresh project or workspace.
  2. Deploy it to the apps that need it.
  3. Disable the leaked key. Google’s leak checklist says to disable the old key only after the new one is verified, to avoid downtime. If spend is climbing fast, disable first and accept the outage.
  4. Lower the spend cap on the affected project while you investigate.
  5. Audit usage by model, hour and key for the window since the leak.
  6. Find the leak path using the table above, and purge it from git history.
  7. Contact the provider about fraudulent usage once you have the timeline.

Let your coding agent test key handling with Apidog CLI

Your backend proxy to OpenAI, Anthropic or Gemini is where key handling breaks: it accepts unauthenticated calls, or echoes the provider key in an error body. Let your coding agent write and run tests for it with Apidog CLI, with secrets kept out of the test definitions.

Set it up once:

npm install -g apidog-cli@latest
apidog login --with-token <YOUR_TOKEN>
npx -y skills add https://apidog.com   # pick your agent when prompted

Then give your agent one prompt:

In Apidog project <id>, create a test case for POST /v1/ai/chat on our proxy.
Assert: no Authorization header returns 401, a bad token returns 401, a valid
token returns 200, and no response body contains "sk-" or "AIza". Read the
token from the {{PROXY_TOKEN}} environment variable, never hardcode it.
Then run it against the staging environment and summarize failures.

The agent reads the payload schema, validates it, creates the case and runs it:

apidog cli-schema get test-case-create
apidog test-case category --project <id>
apidog cli-schema validate test-case-create --file case.json
apidog test-case create --project <id> --file case.json
apidog run --test-case <caseId> --project <id> -e <envId> \
  --env-var "PROXY_TOKEN=$PROXY_TOKEN" -r cli,junit

--env-var passes the token at run time, so it never lives in the spec or the repo. The same apidog run line drops into CI; see Apidog CLI in a CI/CD pipeline and Apidog CLI in Claude Code.

FAQ

What is LLMjacking? It’s the use of a stolen LLM credential, usually an API key, to run inference that the owner pays for. Attackers resell the access or, as with MONST3R-AI, use it to power attack agents.

Can stolen AI API keys really pay for hacking tools? Yes. Bitsight reported that MONST3R-AI’s buyers paste stolen OpenAI, Anthropic or Google keys into its panel, and the seller hosts no model, so victims pay. The seller’s claimed results are unverified.

Does a spend limit stop a stolen key? A hard limit stops spend at the cap, but not instantly. OpenAI and Google both note small overages while limits propagate. Spend alerts alone never stop traffic.

Can I put my OpenAI API key in frontend code? No. Anything shipped to a browser or mobile app can be extracted. Call the model from your backend.

Will GitHub catch a leaked AI key? GitHub secret scanning detects OpenAI, Anthropic and Google Gemini API key patterns. Turn on push protection so a commit with a key is blocked before it’s public.

Explore more

OpenAI CLI: Install It and Call the OpenAI API From Your Terminal

OpenAI CLI: Install It and Call the OpenAI API From Your Terminal

The OpenAI CLI is OpenAI's official openai command for calling the REST API from your terminal. Install, auth, Responses, files, batches and local token counts, plus how it compares with Codex CLI and the legacy Python openai command.

28 October 2026

Codex Pro Limit Cut on October 30: What Changes for Pro 200 and What to Do

Codex Pro Limit Cut on October 30: What Changes for Pro 200 and What to Do

ChatGPT Pro 200 moves to a lower Codex allowance on October 30 at the same $200 price. What OpenAI confirmed, what is only reported, who keeps the old allowance, and four ways to stretch your usage.

28 October 2026

DeepSeek Search API Free Window: Pricing, Fetch API and the Oct 31 Cutoff

DeepSeek Search API Free Window: Pricing, Fetch API and the Oct 31 Cutoff

DeepSeek's Search and Fetch APIs are free only when Claude Code, Codex or DeepSeek Harness calls them, and only until October 31, 2026 at 16:00 UTC. Pricing after the window, rate limits, endpoints, a first request and agent-run tests with Apidog CLI.

28 October 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

Stolen AI API Keys Now Pay for Hacking Scans: How to Lock Down Your OpenAI, Anthropic and Gemini Keys