Join our Newsletter — 33% off our NHI Course
Home› Guides› LLMjacking for Beginners: How Stolen AI Keys Run…
Guide Agent Threats & Attacks

LLMjacking for Beginners: How Stolen AI Keys Run Up Someone Else’s Bill

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 11 min read
On this page

LLMjacking is when criminals use stolen keys to run AI models, and the key's owner pays the bill.

This guide is for anyone whose team pays for AI services, or who is learning about AI security. You do not need to write code to be affected: if your business has an account with an AI provider, its keys are worth stealing.

In short

  • AI services charge for each use, so a stolen key to an AI account is like free money for a criminal.
  • Attackers find keys left in code, steal cloud keys from weak servers, then use or resell the access.
  • The first sign is often a bill that is far higher than normal.
  • Keep keys out of code, set spending limits and alerts, and replace any key that may have leaked.

What you will learn

  • Explain what LLMjacking is in one sentence.
  • Spot the warning signs on an AI bill or usage page.
  • Check that your AI accounts have spending limits and alerts.
  • Ask who owns each AI key your team uses.
AI text tool (large language model, or LLM)
an AI system that reads and writes text, such as a chatbot.
Software password (API key)
a secret code a program shows a service to prove it may use it.
Middleman server (reverse proxy)
a server that passes requests on, so the person using it never sees the key behind it.

What is LLMjacking?

Think of a company fuel card. Someone copies it and sells cheap fill-ups to strangers. The strangers drive away happy, and the company gets the bill at the end of the month.

LLMjacking works the same way with AI. A large language model (LLM) is an AI system that reads and writes text. Big AI providers charge for each request sent to their models. Programs prove they may send requests with a secret code called an API key, or with cloud account keys. These keys belong to a non-human identity (NHI): an identity used by software rather than a person.

If a criminal gets hold of a working key, they can send their own requests. The AI service sees a valid key and answers. The owner of the key pays.

The security firm Sysdig named this attack "LLMjacking" in May 2024. It described attackers using stolen cloud keys to reach AI models, planning to resell the access while the account owner paid the bill.[1]

Where the comparison stops working: a fuel card leaves a trail of petrol stations on the statement. AI requests made with a stolen key can look just like your own app's requests, unless you keep detailed records.

Why does it matter?

The costs can grow fast. In one case, Sysdig estimated the victim could pay over $46,000 a day. That assumed the attacker used the account up to its limits.[1] And some buyers of stolen access use it to make harmful content, which then runs on your account.[3]

If you run a small business that uses AI

What could happen: a key your web supplier left in code is used by strangers, and your monthly AI bill jumps.

Check this: log in to your AI provider's account and look for a spending limit and an email alert.

Next: AI Pricing and Tokens for Beginners

If you are learning to build with AI

What could happen: you paste your key into a public project or a phone app, and someone copies it.

Check this: keep your key in a settings value on your own computer or server, never in shared code.

Next: API Keys for Beginners

If you look after a cloud account

What could happen: stolen cloud keys are used to switch on AI models you never use, in regions you never use.

Check this: turn on records of AI model use and set budget alerts in the cloud console.

Next: Leaked Secret Response for Beginners

What does it look like?

Here is a made-up usage summary that a small firm might see on its AI provider's account page.

Example only. All values are made up.

AI usage summary: example-firm (account EXAMPLE-0000)
Key name        Owner      Last month   This month
support-bot     Orla       $41          $38
FAKE-key-0000   (none)     $0           $9,812     (1)
Requests per hour, this month: 12 then 4,000+      (2)
Models used: chat-small, chat-large-EXAMPLE         (3)
Spending limit: not set                             (4)
  1. In a real screen, this line would show a key with no owner that suddenly costs far more than usual.
  2. A sudden jump in requests at odd hours is a common warning sign.
  3. A larger, more expensive model that nobody in the firm chose to use.
  4. No limit means charges can keep rising until someone notices.

Why this is risky: nobody owns the old key, so nobody is watching it. Once it leaked, anyone holding it could run up charges.

The safer way: give each key a named owner and a clear job. Delete keys you do not need. Set a hard spending limit and an alert, and check the usage page each month. One major provider's own advice includes all of these steps.[5]

How does it work?

The research reports describe a pattern that goes roughly like this.[1][2]

  1. The theft. Attackers find keys left in public places, or break into a server with an unfixed flaw and copy the cloud keys stored there. Microsoft said one group used customer keys "scraped from public sources".[3]
  2. The test. They check which AI services the key can reach. In the first Sysdig case, a script tested the keys against ten different AI services.[1]
  3. The hiding place. They put the key behind a middleman server, called a reverse proxy. Buyers send requests to the middleman and never see the key itself.[2]
  4. The sale. They use the access themselves or sell it. Sysdig found buyers included people banned by AI services and people in countries under sanctions.[2]
  5. The bill. Every request is charged to the key's owner, who may not notice until the invoice arrives.
Flow diagram titled How a stolen AI key becomes someone else's bill. Step 1, a key left in code or on a weak server. Step 2, an attacker copies the key and tests which AI services it opens. Step 3, the key is hidden behind a middleman server called a reverse proxy. Step 4, buyers pay the attacker and send their requests through the middleman. Step 5, the AI service answers because the key is valid. A box below says every request is charged to the key's owner, often first noticed as a much bigger bill than usual. A green bar says defend by keeping keys out of code, setting spending limits and alerts, and replacing leaked keys.
Figure 1. From a leaked key to resold AI access, with the owner paying.

Spending limits and request limits help. A list of top risks for AI apps from the OWASP Foundation, a non-profit security group, calls this kind of cost attack "denial of wallet". It suggests limits on requests, quotas and close watching of usage.[4]

Before and after diagram titled Where the AI key should live. Left panel, labelled Risky: the key is typed into the app's code, the code is shared or published, the key has no owner and there is no spending limit. Right panel, labelled Safer: the key sits in a locked secrets store, the app fetches it when it runs, each key has a named owner, and a spending limit and an alert are set on the AI account.
Figure 2. Risky and safer ways to keep an AI key.

A worked example

Orla Yeboah runs a small online gift shop, a fictional firm with six staff. Last year a freelance developer, Bodhi Ueda, added a chatbot to the website to answer delivery questions.

On Monday, Orla gets an email from her AI provider. Her account has passed its usual spend. She opens the usage page. One key is costing hundreds of dollars a day, and the requests run all night.

Orla remembers the fuel card. Someone has a copy of her card. So she calls Bodhi first.

Bodhi checks the old test version of the chatbot. He finds the key typed into a file that he had shared in a public project. He deletes the key at the AI provider straight away. Once that takes effect, the copied key should no longer work.

Next, he makes a new key for the chatbot. He stores it in the hosting service's secure settings, so it is no longer in the code. The chatbot keeps working.

Orla then sets a monthly spending limit and an alert at half that amount. She writes down who owns each key and what it is for.

Last, she contacts the AI provider's support team to explain what happened and asks about the charges. Whether a provider reduces a bill is up to the provider, so she keeps the emails and screenshots.

The fix takes an afternoon. Orla now checks the usage page on the first of each month.

This is the same pattern seen in real cases.[1][3] Our LLMjacking 2024 to 2026 breach page tells the story.

Myths and mistakes

What people thinkWhat is true
Criminals only want data, not AI.AI access has value on its own. Stolen access is used and resold.[2]
We are too small to be a target.Keys left in public places get collected whoever owns them, so where the key is kept matters more than size.[3]
Hiding the key inside a phone app or web page is fine.Keys in browsers or phone apps can be pulled out. Send requests through your own server instead.[5]
Deleting the key from the code fixes it.Copies may already exist. Replace the key at the AI provider.
The provider will spot misuse for us.Watch your own usage too. Spending limits and alerts are settings you choose.[5]

What can I do this week?

  • List every AI account and key your team uses, with an owner for each.
  • Set a spending limit and a usage alert on each AI account.
  • Ask developers and suppliers where AI keys are kept. "In the code" is the wrong answer.
  • Delete keys that nobody can name a use for.
  • Turn on usage records for AI models in your cloud account, if you use one.

Checklist

  • Every AI key has a named owner and a written purpose.
  • Each person or app has its own key, not one shared key.
  • No AI keys are typed into code, web pages or phone apps.
  • Keys live in a secrets store or the hosting service's secure settings.
  • Each AI account has a spending limit and an alert.
  • Someone checks AI usage at least once a month.
  • Everyone knows that a possibly leaked key is replaced straight away.

Common questions

Where does the word LLMjacking come from?

It joins "LLM", short for large language model, with "hijacking". The security firm Sysdig used the name in May 2024. It described stolen cloud keys used to reach AI models, with the owner left to pay.

How would I know if my AI key was stolen?

Usually through your bill or usage page. Look for sudden jumps in spend, requests at odd hours, models nobody chose, or keys with no owner. Alerts from your AI provider or cloud account can warn you sooner than the monthly invoice.

Will the AI provider refund the charges?

Maybe, but it is the provider's choice and depends on your agreement. Contact their support team quickly, explain what happened and keep evidence. Do not rely on a refund: limits and alerts are the safer protection.

Is LLMjacking the same as prompt injection?

No. LLMjacking is about stealing the key that pays for an AI service. Prompt injection is about tricking an AI with hidden instructions in text. Both are AI risks, but the defences differ. See Prompt Injection for Beginners.

What should I do first if a key leaks?

Delete or replace the key at the AI provider first, so the copied key should no longer give access. Then update your app with a new key kept somewhere safe, check your usage and bill, and set limits. The LLMjacking Response Playbook gives the full steps.

Where next?

Ready for the detail? Read the practitioner guide: LLMjacking Response Playbook. It goes further into containing an active attack, checking cloud records and recovering safely.

Also useful:

Related NHI Mgmt Group resources: How to Find LLM API Keys in Code and CI · Non-Human Identities for Beginners

Key terms

LLMjacking
Using stolen keys to run someone else's AI services, so they pay the bill.
Large language model
An AI system trained on large amounts of text that reads and writes language.
API key
A secret code a program uses to prove it may use a service, often long-lived.
Reverse proxy
A server that receives requests and passes them on to the service behind it.
Rate limiting
A control that caps how many requests a caller can make in a set time.
Secrets rotation
Replacing a key or password so the old copy stops working.

Sources and further reading

  1. LLMjacking: Stolen Cloud Credentials Used in New AI Attack. Sysdig Threat Research Team, 6 May 2024. https://sysdig.com/blog/llmjacking-stolen-cloud-credentials-used-in-new-ai-attack/, accessed 28 Nov 2026.
  2. The Growing Dangers of LLMjacking: Evolved Tactics and Evading Sanctions. Sysdig, 18 September 2024. https://sysdig.com/blog/growing-dangers-of-llmjacking/, accessed 28 Nov 2026.
  3. Disrupting a global cybercrime network abusing generative AI. Microsoft On the Issues, Microsoft Digital Crimes Unit, 27 February 2025. https://blogs.microsoft.com/on-the-issues/2025/02/27/disrupting-cybercrime-abusing-gen-ai/, accessed 28 Nov 2026.
  4. OWASP Top 10 for LLM Applications 2025, LLM10:2025 Unbounded Consumption. OWASP GenAI Security Project. https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/, accessed 28 Nov 2026.
  5. Best Practices for API Key Safety. OpenAI Help Center, OpenAI. https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety, accessed 28 Nov 2026.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.