Security researchers at Google Cloud's Threat Intelligence Group (GTIG) and Mandiant have published findings on a credential-theft technique they are calling LLMjacking: the use of stolen cloud API credentials specifically to access large language model inference endpoints. Victims have faced unexpected cloud bills of up to $1 million USD before the activity was detected.
How LLMjacking works
Attackers obtain valid API keys through a range of methods: exposed secrets in public code repositories, phishing, credential-stuffing against developer portals, and in some cases purchasing keys on darknet markets. Once they have a key, they submit high-volume inference requests, often to generate content for spam campaigns, synthetic media production, or to resell access to other threat actors. Because AI inference costs scale with tokens, a single compromised key can generate enormous charges in hours.
Scale of the problem
GTIG and Mandiant documented cases where organizations did not detect the unauthorized activity for days or weeks. Billing alerts on AI services often default to thresholds designed for expected scale-up, not anomalous external use. In several cases, the first indication was a cloud invoice that exceeded the organization's total monthly IT budget.
Defensive measures
The researchers recommend scoping API keys to minimum necessary permissions and setting hard spending caps rather than alerting thresholds. Keys should be treated as high-value credentials and rotated on a schedule comparable to privileged infrastructure secrets. Organizations should also monitor inference API call patterns, not just spend, since rate limiting and geographic anomalies appear before billing totals spike. Using short-lived tokens issued by a secrets manager rather than long-lived static keys eliminates an entire attack class.
Gigia Tsiklauri is editor of Infosec.ge. Get in touch if you have a tip or correction.