LLMjacking and LiteLLM CVE-2026-40217: How to Protect Your AI API Keys


هجمات LLMjacking وثغرة LiteLLM CVE-2026-40217: كيف تحمي مفاتيح API

A developer at a startup opens the cloud billing dashboard one morning and finds that the AI services bill jumped overnight to a figure nobody on the team has ever seen. Nothing new had launched. What happened is that someone got hold of an API key or a set of cloud credentials, started running large language models on the company's account, and then sold that access on to others. Researchers call this LLMjacking.

The topic came back into focus in November 2026 for two reasons: a detailed report on the trend from Google's threat intelligence team, and the addition of a flaw in the open-source LiteLLM gateway to the US CISA catalog of exploited vulnerabilities.

In short: LLMjacking means stealing API keys or cloud credentials to run AI models on the victim's bill or to resell that access. CISA added LiteLLM flaw CVE-2026-40217 to its Known Exploited Vulnerabilities catalog on 18 November 2026, and Google linked it to this kind of activity. Protection starts with patching, key rotation, spend limits and alerts.

What exactly is LLMjacking?

In a report published on 3 November 2026, the Google Threat Intelligence Group defines LLMjacking as hijacking an organization's access to large language models for financial gain. The report contrasts it with cryptojacking: crypto mining eats resources slowly, while LLMjacking can drive sharp spikes in charges within hours.

According to BleepingComputer's coverage of the report, fraudulent charges at some organizations exceeded $100,000 in a single day, and some reached around $1 million cumulatively before the stolen keys were revoked. Google also observed one actor making more than 500,000 API calls in under eight hours.

How do attackers get in?

  • Stolen or exposed cloud credentials: the most common entry point, according to Google, including service account keys, GitHub personal access tokens and active session tokens.
  • API keys left in public repositories: attackers harvest them from GitHub and test them with tiny requests designed to slip under monitoring thresholds.
  • Model endpoints exposed to the internet: such as self-hosted model servers left without authentication.
  • Phishing pages that trick users into pasting their own access token, letting the attacker skip both the password and multi-factor authentication.

And how do they cash in?

Attackers rarely keep the access to themselves. Google describes services it calls "LLM mixers" that pool stolen access from many victims and resell it to subscribers on cheap plans. Your stolen key could be serving strangers while you pay.

The LiteLLM CVE-2026-40217 flaw explained

LiteLLM is an open-source tool that acts as a single gateway (proxy) between a company's applications and its various model providers, managing "virtual keys" for teams and users. Because it holds the real provider keys, it makes a valuable target.

According to the project's official security advisory on GitHub, the flaw sits in the /guardrails/test_custom_code endpoint used to test custom guardrails, which runs Python code inside a sandbox. Researchers found that bytecode-level techniques allow an escape from that sandbox and arbitrary code execution inside the gateway process, which runs as root in the default Docker image. Affected versions run from 1.81.8 up to, but not including, 1.83.10.

One detail matters here. The advisory says exploitation in default configurations requires a proxy-admin credential. That is where the LLMjacking link comes in: Google's report describes a group that bought ready-made virtual keys from another actor, then escalated them into full admin credentials, and it cites CVE-2026-40217 in that context. Google's technical description of the flaw differs from the official advisory, so rely on LiteLLM's advisory for the technical details. What everyone agrees on is that the flaw is being exploited and that CISA added it to the catalog on 18 November 2026, giving US federal agencies until 2 December to fix it.

How to protect AI API keys from hijacking

These steps draw on Google's recommendations and the LiteLLM advisory:

  1. Update LiteLLM now. Move to the latest stable release. If you can't update yet, block POST requests to /guardrails/test_custom_code at your reverse proxy or API gateway, as the advisory suggests.
  2. Audit admin access. Make sure every key with proxy-admin rights is known and justified, and remove anything you can't account for.
  3. Rotate keys at the first doubt. Replace provider keys and database connection credentials, and use a central secrets manager with automatic rotation instead of keeping keys in config files.
  4. Cap your spending. Turn on spend limits and budget alerts with every cloud provider and model service.
  5. Scope keys tightly. One key per environment and per model, each with its own usage quota. Deny any permission that isn't explicitly needed, including the ability to enable model services in the first place.
  6. Scan repositories for secrets. Enable automatic secret scanning on GitHub or your equivalent.
  7. Watch the logs. Google advises monitoring for small, repeated requests used to validate keys, any unauthorized enabling of a model service, and any attempt to switch off audit logging.
  8. Use phishing-resistant sign-in. Passkeys or hardware security keys on cloud accounts and developer platforms close off a major entry route.
ActionProtects you fromTime needed
Budget alerts and spend limitsA surprise billMinutes
Update LiteLLM or block the test endpointExploitation of CVE-2026-40217About an hour
Key rotation and a secrets managerOngoing use of stolen keysA working day
Repository scanning and log monitoringThe next leak, before it happensOngoing setup

Keep in mind that many of these attacks begin with passwords stolen from a developer's own machine, as in the Armorsteal campaign spread through fake search results.

Does this matter if you're not a big company?

Yes. A solo developer who connects an app to a model API and leaves the key in front-end code faces the same risk, usually with nobody watching the bill. Never ship an API key inside an app users can reach, never commit it to a repository, and give it a spending cap from day one. See our guide on protecting your accounts from hacking.

FAQ

What is the difference between LLMjacking and cryptojacking?

Both abuse the victim's resources, but cryptojacking consumes them slowly, while LLMjacking can push the bill up sharply within hours, according to Google.

How do I know if my API key has been stolen?

Common signs include a sudden jump in usage, requests from unfamiliar addresses or regions, calls to models your team doesn't use, or services being enabled that nobody requested.

Is LiteLLM CVE-2026-40217 dangerous if my gateway isn't exposed?

The risk is lower but still real, since an attacker may reach it from inside the network or with a stolen key. Updating is still the right call.

What should I do first if I find unauthorized usage?

Revoke the affected keys immediately, issue new ones, review your audit logs, and contact your provider's support about the charges.

The takeaway

AI keys have become cash in the hands of whoever steals them. Update LiteLLM if you use it, set spend limits and alerts today, and treat every API key like a banking password. These recommendations are for awareness; applying them in your environment should be reviewed by qualified personnel.

Sources: Google Cloud Blog (Google Threat Intelligence Group), BleepingComputer, LiteLLM security advisory on GitHub, CISA Known Exploited Vulnerabilities Catalog.

Because securing AI keys is part of securing your business, our interest extends from following Arabic websites and specialized blogs, to what Egypt stores, Kuwait stores, vitamin stores and international sites offer, with Mashhor for social media services as a key to growth.

 

That's it, friends. We hope you found this useful ✌

Best wishes from the #Ezznology team.

Join our community on Telegram and our Facebook group, and follow us on Google News.

 

You may also like:

Passkeys guide: turning them on for Google, iPhone, WhatsApp and Microsoft

Beware the top Google result: Armorsteal steals passwords via fake sites

How to protect your accounts from hacking

How cloud security works