Opens in a new tab

Independent WordPress hosting guides · Recommended host: Convesio

Start a free trial →

Stolen AI Spend: Protecting Your API Keys After the Railway Breach

An attacker searched customer variables for AI keys and ran up about $740,000 of spend. How to store, limit and monitor the AI keys behind your website tools.
By Shahzad Hasan · November 18, 2026

In November 2026 Railway published its final report on a breach in which the attacker searched customers’ environment variables for AI provider keys; unauthorised spend reached about $740,000. The same week Cursor published a postmortem in which an exposed vendor key revealed coding-agent traces, some containing plaintext credentials. Vibe Coding Weekly’s two checks: know where your agent traces are stored and who can reach them, and put a provider-side spend limit on every AI key (Vibe Coding Weekly #55).

Figures and claims about other companies are as reported at the time and summarised by Vibe Coding Weekly; check the original announcement before relying on them.

Where WordPress sites keep AI keys

  • AI plugins (content, chat, SEO) storing keys in the database.
  • wp-config or environment variables on the host.
  • Deployment and hosting dashboards.
  • Agent sessions, logs and transcripts.

Protect them

  1. Spend limits on every key, set at the provider. See Hard budget caps.
  2. One key per site or tool, so a leak is contained and easy to revoke.
  3. Least access: only the models and features each key needs.
  4. No keys in chat, code or screenshots. Use the host’s secret store. On this site, credentials are injected by a proxy and never appear in the session.
  5. Clean logs: make sure debug logs and agent transcripts do not record keys.
  6. Rotate keys regularly and immediately after any suspected leak.
  7. Monitor usage for spikes at odd hours.

If a key leaks

  • Revoke it first, investigate second.
  • Check usage history for unknown activity.
  • Contact the provider about fraudulent charges.
  • Find how it leaked before issuing a new one.

More in Security for vibe coders.

Source: Vibe Coding Weekly #55. This article is our own take for WordPress and Bricks builders; it does not reproduce the newsletter.

In this article

Need hosting that scales?

Convesio runs each site in Docker containers with auto scaling and load balancing built in.
Try Convesio free →
Affiliate link: we may earn a commission at no extra cost to you.