When a mobile app is “hacked”, the app on the phone is rarely the target. Attackers go after what the app talks to: leaked API and AI keys, open database rules, stolen admin tokens and forgotten servers, and the first job is to revoke and contain without breaking the live app.
Here are the five patterns we see most, how to spot them, and a safe order for fixing them.
The five patterns at a glance
| Pattern | What you notice | First move |
|---|---|---|
| Keys pulled out of the app build | Unexpected bills, quota alerts, usage from unknown countries | Cap spending, then rotate the key server-side |
| Stolen AI and cloud keys (“LLMjacking”) | AI or cloud bill spikes within hours, new keys you didn’t create | Revoke the key, delete keys the attacker created |
| Open Firebase or Supabase rules | Data read, changed or deleted by strangers | Lock the rules immediately |
| Stolen admin tokens and sessions | Admin actions you didn’t make | Revoke all sessions, rotate signing secrets |
| A forgotten server or old API version | Attacks on an endpoint nobody maintains | Shut it down or patch it |
1. API keys pulled out of the app build
Anything shipped inside an Android or iOS app can be extracted, so a secret key in the build (payment, SMS, email, maps without restrictions, cloud admin) should be treated as public. Move secret calls behind your own server, restrict the keys that must stay in the app by app ID or bundle ID, and rotate anything that was exposed.
2. Stolen AI and cloud keys: “LLMjacking”
Apps now hold keys for OpenAI, Gemini, Claude and cloud accounts. Attackers steal them from app builds, code repositories, .env files left on servers, open AI endpoints or stolen tokens, then use or resell your AI access. Google’s Threat Intelligence Group and Mandiant reported in November 2026 that in incidents they handled, fraudulent charges passed $100,000 in a single day, and at some organisations reached $1 million before access was revoked. A broad cloud key can also open storage and databases, not just the AI model.
3. Open Firebase or Supabase rules
Rules left in test mode (“allow read, write: if true”) or tables without row-level security let anyone read or change data. Lock the rules straight away, then write proper per-user rules, test them, and work out what was read or changed.
Free resource
Upgrade and patching checklist
Want this applied to your project? Our engineers will send it with notes for your stack.
4. Stolen admin tokens and sessions
Long-lived tokens in logs, shared dashboards or leaked .env files let attackers act as admins. Revoke every session and token, rotate the signing secret, shorten token lifetimes and add two-factor authentication to admin panels.
5. A forgotten server
An old staging server, admin panel or API version still running with old code, often connected to the same database. Inventory every endpoint, shut down what isn’t needed, and patch or rebuild what is.
The order matters: fix it without taking the app down
Rotating keys in the wrong order can break the live app for every user. A safe sequence:
- Contain. Set spending caps and usage alerts with the provider, rate-limit or pause the abused service, and lock database rules.
- Add the new key or route alongside the old one, on your server.
- Ship an app update that uses the new route; consider a forced update for old versions.
- Revoke the old key once most users have updated, or immediately if the abuse is severe and a short outage is acceptable.
- Review the logs for what was accessed, which keys and users the attacker created, and keep a timeline. You’ll need it to dispute charges with the provider.
Patching it yourself vs a planned recovery
| Quick revoke-and-hope | Planned recovery | |
|---|---|---|
| Stops the abuse | Yes, but may break the app | Yes, without downtime where possible |
| Finds every place the key lived | Rarely | Yes: builds, repos, CI, servers |
| Removes keys and users the attacker created | Often missed | Yes |
| Timeline for a billing dispute | No | Yes |
| Stops it happening again | No | Secrets moved server-side, caps and alerts set |
What this taught us about our own systems
The weak spot we found on our own website in October 2026 was the same idea in a different place: old files on a live server still holding working cloud credentials. Keys outlive the code that used them. Search for every key you have ever issued, not just the ones in today’s app.
Who this guide is not for
- A single user’s phone infected with malware. That’s a device problem, not an app back-end problem.
- Apps with no server, keys or user accounts. There’s little for an attacker to steal.
- Breaches of company networks or ransomware. Call a formal incident-response firm.
How Vibidsoft can help
We build mobile apps and their back ends, so we know both sides. Our hacked website and app repair covers secret rotation without breaking live apps, Firebase, Supabase and API rule fixes, server clean-up or rebuild, and a forced-update plan, at a fixed price agreed before work starts. For prevention, read our API security guide and how to choose a maintenance plan.
FAQs
Can someone really get my API key from my app?
Yes. App packages can be unpacked and searched for strings. Assume any secret inside the app is public.
Will revoking the key break my app?
It can, if the app still uses it. Add the new route first, ship an update, then revoke, unless the abuse is costly enough to accept a short outage.
Will the AI provider refund fraudulent charges?
Sometimes, but it isn’t guaranteed. A clear timeline from your logs and fast revocation help your case.
How do I stop keys leaking again?
Keep secrets on your server, use per-environment keys with spending caps and alerts, scan repositories for secrets, and review who and what can use each key every quarter.
Sources
- Google Threat Intelligence Group and Mandiant: The Rise of LLMJacking (3 Nov 2026)
- Cloud Security Alliance: LLMjacking research note (2026)
- OWASP: API Security Top 10
Published November 2026.
