SecurCheckCyber Center
Need help
Back to analysis tools
All cyber threats
Infrastructure

API key theft

API key theft, exposed API token

An attacker obtains an API credential and uses it to access services, consume quotas or manipulate resources without authorisation.

Fiche de sensibilisationPrête à diffuser à vos équipes ou clients

MIGHT YOU BE AFFECTED?

Turn knowledge into action.

How does this work?

A secret stored in source code, browser assets, logs or an infected endpoint can be copied and used directly unless the provider restricts its privileges and context.

REAL-WORLD EXAMPLE

« An organisation accidentally commits a cloud API key to a public repository, and the key is used to create expensive resources. »

Typical sequence

  1. 1The attacker finds an API key in code, a log or a compromised system.
  2. 2They test the credential against the relevant service.
  3. 3Unauthorised API requests consume resources or access data.
  4. 4The attacker may retain the key until it is revoked.

Warning signs

  • API requests from unfamiliar addresses or geographical regions.
  • Unexpected quota consumption or increases in cloud invoices.
  • Keys discovered in a repository or public client bundle.
  • Unusual permissions, services or resources created by the affected identity.

How to protect yourself

  • Store credentials in a managed secret vault rather than source code.
  • Limit scopes, network access, lifetime and quotas wherever supported.
  • Rotate keys regularly and immediately after suspected exposure.
  • Monitor API-key usage and scan repositories and build logs for secrets.

If you think you are affected

Revoke the exposed credential immediately, issue a replacement with minimal privileges and inspect all calls made using the old key. Identify accessed data, remediate abuse and review billing and notification obligations.

Get help

Last updated: 8 October 2026