What is LLMjacking?

LLMjacking is attackers using stolen API keys or cloud credentials to access an organisation's large language model services without authorisation for their own purposes, leaving the bill with the victim; access is often resold to others through a reverse proxy.

It is the stolen-credential form of unbounded consumption in AI, the risk of an AI service's resources being consumed without control. Unlike a model extraction attack, which tries to copy the model, LLMjacking aims to use it for free.

Topic
AI security
Also known as
LLM hijacking
Origin
The term was first used in cloud security research in May 2024.

How LLMjacking works

  1. The attacker obtains credentials through keys leaked into code repositories, vulnerable applications or compromised accounts.
  2. It quietly probes which models are reachable, sometimes enabling model access.
  3. Access is linked to a proxy and sold to others or used for the attacker's own work.
  4. The organisation often notices only through an unusual bill or quota alert.

In more detail

The attack chain: over-privileged IAM, model enablement and log evasion

In documented cloud incidents, attackers look specifically for over-privileged IAM credentials (for example via leaked '.env' files or vulnerable web applications) that permit both listing available foundation models and invoking them. Crucially, attackers also inspect or attempt to disable cloud model invocation logging to delay detection while routing stolen capacity through open-source reverse proxies.

Risks to on-premise and self-hosted inference servers

LLMjacking is not limited to cloud APIs: attackers increasingly scan the internet for misconfigured or unauthenticated self-hosted inference servers (such as exposed Ollama, vLLM or LiteLLM endpoints). Even without a per-token cloud bill, hijacking an on-premise server causes GPU saturation, service degradation for internal users and potential access to internal fine-tuned models or connected RAG data.

Layered defence: separated permissions, token circuit breakers and anomaly detection

Effective defence requires hard spending caps and circuit breakers alongside credential hygiene: enforcing least-privilege IAM policies (separating model-activation rights from model-invocation rights), setting per-token/per-minute quotas at an AI gateway, monitoring anomalous output-to-input token ratios and blocking known proxy/anonymiser egress patterns.

Commonly confused terms

TermHow it differs
AI unbounded consumptionOWASP LLM10 Unbounded Consumption is the overarching risk category covering any uncontrolled AI resource exhaustion (including legitimate-user input floods or denial-of-wallet), whereas LLMjacking is specifically the theft and abuse of credentials to hijack LLM access and monetise it.
Model extraction attackModel extraction sends crafted queries to reconstruct or steal the weights/behaviour of a proprietary model, whereas LLMjacking steals credentials to consume or resell inference compute at the victim's expense without needing to clone the model.
Prompt injectionPrompt injection hijacks the model's instruction-following behaviour through crafted inputs, whereas LLMjacking hijacks the underlying cloud/API credentials or exposed inference endpoint itself at the infrastructure/IAM layer.

Why LLMjacking matters for on-premises AI

With cloud language model services, cost tracks usage, so a leaked credential turns straight into financial loss. The security research first reporting the attack estimated an undetected attack could cost the victim over 46,000 dollars a day in model usage. Controls: keeping keys out of code and rotating them, short-lived credentials, threshold alerts on usage and cost, token rate limits and monitoring model access events. In-house models need the same care with internal credentials.

ON-PREMISES EXAMPLE

A test key for a bank's in-house assistant service is accidentally pushed to a code repository; usage monitoring at the gateway spots an unusual night-time token surge, disables the key automatically and opens an incident for the security team.

Common questions

How is LLMjacking noticed?

Through unusual usage spikes, requests at odd hours or from odd locations, attempts to reach new models and unexpected bill or quota alerts.

What is the most basic control against LLMjacking?

Protecting credentials: keeping keys out of code, using short-lived narrow credentials and setting threshold alerts on usage and cost.

Sources

In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.