
How AI Token Theft Is Costing Millions of Dollars
Automatically translatedA single leaked API key was connected to a gray-market proxy service within minutes. By the time it was noticed and shut down, the bill was approaching one million dollars. This case, described in Palo Alto Networks Unit 42's report dated August 6, 2026, shows the scale that the crime known as token theft has reached. This article covers how the attack works, the ways keys leak, and the measures developers can take.
What Is AI Token Theft?
Token theft is the act of stealing API keys that developers generate for programmatic access to AI platforms and using them under someone else's account. The token here does not mean a browser session cookie. In language models, a token is the smallest unit of input and output text that is billed. Stealing a key means that paid purchasing power changes hands directly.
The distinction matters because of the mechanism. When a username and password are stolen, the attacker logs into the account. When an API key is stolen, the attacker passes through a door designed for automated processes without facing any login screen. According to the analysis published by Unit 42, access to frontier models is expensive and sometimes restricted, which has turned a stolen key into a commodity that quickly becomes cash.

Why Are Costs Growing So Fast?
In AI services, consumption is not tied to a predefined target. Long conversations, large context windows, tool calls, and agent loops produce very different volumes on the same account. To keep workflows uninterrupted, most providers do not impose strict consumption ceilings; they accumulate usage and bill at the end of the period.
This is exactly where the attack finds room. The gap between the moment of theft and the moment the bill becomes visible is measured in days. The victim receives no warning while the loss is happening. As AI usage has settled into token-based pricing, this gap has spread across the industry.
Price differences also inflate the total. For frontier models, per-million-token rates can reach tens of dollars for long-context work, as seen in Claude's pricing. When an automated workload runs the same key for days, the total reaches a level that can strain corporate budgets.

How Do Transfer Stations Work?
Stolen keys end up at intermediary layers called transfer stations. Sitting between the official provider and end users, these services sell access to frontier models far below retail price. Most listings appear on Chinese marketplaces such as Taobao, and payment is made in anonymous credits the seller issues.
The technical side is less complex than it sounds. Most stations run on open-source proxy software such as new-api and one-api. This layer handles identity masking, rotation of real keys, billing, model routing, and prompt normalization. According to findings reported by Cybersecurity News, these infrastructures can generate tens of millions of API calls per day.
The second victim in the chain is often invisible. Developers who turn to a station for cheap access may find their prompts routed to weaker models than advertised. Sessions can be monitored and scanned for sensitive data, and today's customer can become tomorrow's target.

How Are API Keys Being Stolen?
For transfer stations to stay cheap, they need a constant supply of fresh keys. Buying at retail price and reselling at a discount leaves no margin, so operators turn to stolen credentials. The routes Unit 42 has compiled are listed below:
Information-stealing malware: Credentials and saved sessions are collected from developer machines.
Phishing campaigns: Accounts of authorized developers are targeted; with the captured account, new keys are generated, model access is verified, spending limits are removed, and logging is disabled along with usage alerts.
Exposed repositories: Misconfigured file shares and public code repositories are scanned to collect ready-made keys.
Access brokers: Privileged developer accounts are offered for sale directly on dark web marketplaces.
Poisoned npm packages: Self-replicating packages steal credentials from the environments where they are installed and infect the developer's later published versions.
The last item carries particular weight. In the Shai-Hulud and Miasma campaigns examined in Unit 42's npm threat landscape report, the volume of collected credentials is said to be large enough to supply transfer stations for years. The multiplier effect of supply chain intrusion followed the same logic in the AI agent cyberattack case previously covered on Masqot.

The Difference Between Token Theft and Password Theft
A stolen password and a stolen AI key cannot be treated as the same category from a defensive standpoint. The difference lies in how the damage accumulates and whether it can be reversed.
Criterion | Stolen password | Stolen cloud key | Stolen AI key |
|---|---|---|---|
Detection | Through login alerts | Through resource monitoring | At billing time |
Damage accumulation | For the duration of access | While the resource stays open | Within seconds |
Recovery | Password reset | Resource deletion | Nearly none |
Resale | Limited | Medium | High |
The last row of the table can be considered the engine of the crime model. The buyer of a stolen email account is narrow; the buyer of stolen frontier model access is anyone seeking cheap computing power. The Cloud Security Alliance's research note on LLMjacking reports that this access is now directed not only toward free use but also toward feeding offensive tooling. Stolen computing power is becoming the infrastructure for scenarios discussed under malicious AI models.
How Can Developers Protect Themselves?
Most of the defense involves tightening existing settings rather than buying a new product. The measures Unit 42 recommends can be grouped as follows:
Set a spending limit: Define a ceiling on the account and trigger an alert when consumption deviates noticeably from the baseline.
Switch to short-lived tokens: Using expiring tokens instead of long-lived access keys narrows the window of exposure after a leak.
Review privileged accounts: Every account that can provision resources or change spending limits should be checked individually.
Set network boundaries: Restricting a key to use only from a defined network prevents stolen information from being useful at a transfer station.
Monitor the development environment: Scanning packages before they enter the pipeline prevents poisoned dependencies from harvesting keys.
One detail is emphasized in particular: a sudden spike in usage is not an accounting problem but a situation requiring incident response. In the assessment reported by Cybernews, attackers were said to disable alerts and logging on the accounts they took over. Silence itself should be treated as a signal.

Which Controls Work for Organizations?
On the corporate side, the problem cannot be solved through individual vigilance. When dozens of teams, hundreds of repositories, and constantly changing agent workloads are involved, it becomes impossible to track where keys are stored. The recommended approach is to move keys out of developer environments and into a central control plane.
An AI gateway serves this function. When all model traffic passes through a single point, usage, agent actions, and token spending become visible by team. Pairing the gateway with machine identity authentication ensures that every call is tied to a verified identity. A call without an identity is a call whose source is unknown.
Defining network boundaries for computing resources serves the same purpose. If a leaked key cannot be used from outside the corporate network, the transfer station scenario ends before it begins. In the cases where losses occurred, the common factor was that none of these layers were in place.
Frequently Asked Questions
What is AI token theft? It is the theft of API keys that provide programmatic access to AI platforms, producing usage that is charged to the victim's account. The token here is not browser session information but the text unit used for billing in language models. A stolen key means ready-made purchasing power for the attacker. The access obtained is usually resold through gray-market services.
How can you tell that a key has been stolen? The most reliable signal is a sudden and sharp deviation of consumption from its usual baseline. Beyond that, new keys appearing that were never generated, changes to spending limits, and alert or logging settings being quietly turned off are strong indicators. Repeated client signatures in calls from unknown sources should also be examined.
Can a bill caused by a stolen key be reversed? In practice, this is very difficult. Because the usage has occurred and been measured by the provider, there is no established recovery path for affected organizations. Unit 42 reports that the amounts can reach a level that could drive small companies into bankruptcy. For this reason, defense is built on prevention rather than compensation.
Is using a transfer station risky? Yes, both legally and technically. The access these services offer often originates from stolen credentials. A user's prompts may be routed to different and weaker models than advertised. Because session content can be recorded and scanned for sensitive data, the developer effectively gives up the confidentiality of their own project in exchange for cheap access.
What should small teams do first? The first step is to find out where each key is stored. Then a spending limit and deviation alert should be set on every account, and long-lived keys should be replaced with short-lived tokens. Scanning code repositories and file shares for leaks is a low-cost but effective step.
In the cases documented by Unit 42, what enabled the attack was not an advanced technique but a setting left open. At a time when AI spending keeps growing in corporate budgets, the question of where a key is stored has become a security question. The document that shows the cost of a leak, however, usually arrives at the end of the month.
Yapay Zekanın Babası Uyardı: Asi AI'lar Geliyor mu?


Türkçe Prompt Nasıl Yazılır? Örnekli Prompt Rehberi




