API Breaches: 72% of 2025 Attacks Exposed

Listen to this article · 8 min listen

A staggering 72% of all data breaches in 2025 involved compromised API credentials, according to a recent report from the Identity Theft Resource Center (ITRC) 2025 Data Breach Report. This statistic alone should force every developer and security architect to re-evaluate their approach to API security. Given the pervasive integration of REST APIs across modern applications, securing them with strong protocols like OAuth 2.0 and OIDC isn’t merely a recommendation. It’s an existential necessity.

Key Takeaways

  • Implement OAuth 2.0 with a strong authorization grant flow, such as Authorization Code with PKCE, to protect against common interception attacks.
  • Use OpenID Connect (OIDC) for identity layer authentication, ensuring user identity verification separate from resource authorization.
  • Regularly audit and rotate API keys and tokens, as static credentials remain a primary vector for unauthorized access.
  • Configure granular scope permissions in OAuth 2.0 to enforce the principle of least privilege for API access.
  • Prioritize secure token storage on client-side applications, using browser-native mechanisms or secure enclaves over local storage.

The Alarming Rise of API-Related Breaches: A 72% Problem

The ITRC’s finding that 72% of 2025’s data breaches stemmed from compromised API credentials isn’t just a number. It represents a fundamental shift in the attack surface. For years, perimeter defenses and traditional web application firewalls dominated security discussions, but the reality is that modern architectures are increasingly API-driven. This percentage tells us that attackers are no longer primarily targeting user interfaces. They are going straight for the programmatic interfaces that power our digital ecosystems. My professional experience confirms this trend: the most sophisticated attacks I’ve observed in the past year involved lateral movement within a compromised network, initiated by gaining access to a single, inadequately secured API endpoint. It’s a stark reminder that an API, no matter how small or seemingly insignificant, can be the weakest link in an otherwise strong security chain. The focus needs to move beyond just securing the application frontend to ensuring every API call is authenticated and authorized with the same rigor.

The Underutilization of Strong Authorization Flows: Only 35% Adopt PKCE

Despite its proven efficacy, only about 35% of publicly accessible APIs implementing OAuth 2.0 currently use the Authorization Code Grant with PKCE (Proof Key for Code Exchange), according to a 2025 analysis by the OpenID Foundation OpenID Foundation’s Developer Resources. This figure is frankly disappointing. PKCE directly mitigates the authorization code interception attack, a common vulnerability particularly in mobile and single-page applications where client secrets cannot be securely stored. The conventional wisdom often suggests that for server-side applications, PKCE is less critical because a client secret can be protected. However, this overlooks the increasing complexity of modern deployments, including serverless functions and microservices, where “server-side” can still mean a dynamic, ephemeral environment. Relying solely on a client secret for server-side applications, without the added layer of PKCE, is a calculated risk that many organizations are taking unnecessarily. The marginal effort to implement PKCE across all authorization code flows far outweighs the potential cost of a breach stemming from an intercepted code. We should advocate for its universal adoption, irrespective of client type.

The Identity Disconnect: 28% of Organizations Still Roll Their Own Authentication

A recent survey by Okta Businesses at Work 2026 Report revealed that 28% of enterprises continue to develop custom authentication solutions for their internal and external applications, often bypassing established standards like OpenID Connect (OIDC). This statistic is particularly concerning because authentication is a solved problem. OIDC, built on top of OAuth 2.0, provides a standardized, secure, and interoperable way to verify the identity of an end-user. When organizations attempt to “roll their own” authentication, they inevitably introduce subtle vulnerabilities, overlook edge cases, and struggle to keep pace with evolving threat field. These custom solutions often lack the rigorous security reviews, community scrutiny, and continuous updates that standards-based protocols receive. The argument I frequently hear is about “control” or “flexibility,” but in practice, it typically results in higher maintenance costs and a greater attack surface. My strong opinion is that building custom authentication today is a misallocation of resources and a dangerous security gamble. Focus on your core business logic. Let OIDC handle the identity verification.

Token Management Failures: 45% of Tokens Expire Too Slowly or Are Not Revoked Promptly

A report from the Cloud Security Alliance (CSA) API Security Top Threats 2026 highlighted that 45% of organizations struggle with effective token management, specifically citing issues with overly long token expiration times or inefficient revocation mechanisms. This statistic shows a critical operational security gap. An access token is, by its nature, a bearer token. Anyone possessing it can use it. Therefore, its lifespan and the ability to revoke it rapidly are paramount. If a token is compromised, a long expiration time gives attackers an extended window to exploit access. Similarly, a cumbersome revocation process means that even after a compromise is detected, the unauthorized access might persist for an unacceptable duration. I’ve seen firsthand how an access token valid for 24 hours, once stolen, can lead to significant data exfiltration before detection and revocation. The industry consensus leans towards short-lived access tokens (e.g., 5 to 15 minutes) combined with refresh tokens, which require re-authentication or re-authorization when used. Implement strong token revocation lists (CRLs) or online certificate status protocol (OCSP) for tokens, ensuring that compromised tokens are invalidated immediately across all services.

The Human Element: 60% of API Security Incidents Trace Back to Configuration Errors

A recent analysis by Snyk State of Open Source Security 2026 indicates that approximately 60% of API security incidents are in the end attributable to misconfigurations or human error in setup. This number is sobering because it points to a problem that technology alone cannot fully solve. While OAuth 2.0 and OIDC provide powerful security primitives, their effectiveness hinges entirely on correct implementation and configuration. Common misconfigurations include overly broad scopes, insecure redirect URIs, weak client secret management, and improper validation of JWT signatures. This is where I disagree with the conventional wisdom that “security is a product problem.” Security is fundamentally a process and people problem, augmented by products. You can have the most advanced identity and access management (IAM) solution, but if developers are not adequately trained on its secure usage, or if deployment pipelines lack automated security checks for configuration drift, vulnerabilities will emerge. Investing in developer education, implementing security-as-code principles, and integrating automated static and dynamic analysis into the CI/CD pipeline are non-negotiable steps to reduce this human error factor. Securing REST APIs with OAuth 2.0 and OIDC demands a proactive, layered approach that prioritizes both strong technical implementation and continuous operational vigilance.

What is the primary difference between OAuth 2.0 and OIDC?

OAuth 2.0 is an authorization framework that allows a user to grant a third-party application limited access to their resources on another service, without sharing their credentials. OpenID Connect (OIDC) is an identity layer built on top of OAuth 2.0 that enables clients to verify the identity of an end-user based on the authentication performed by an authorization server, as well as to obtain basic profile information about the end-user.

Why is the Authorization Code Grant with PKCE considered the most secure OAuth 2.0 flow for public clients?

The Authorization Code Grant with PKCE is the most secure for public clients (like single-page applications or mobile apps) because it mitigates the authorization code interception attack. PKCE adds a dynamically generated “code verifier” sent during the authorization request and a “code challenge” sent during the token exchange. This ensures that even if an attacker intercepts the authorization code, they cannot exchange it for an access token without the corresponding code verifier, which is unique to the legitimate client.

What are “scopes” in OAuth 2.0 and why are they important for API security?

Scopes in OAuth 2.0 define the specific permissions an application requests from a user to access their resources. For example, a scope might be read:email or write:calendar. They are important for API security because they enforce the principle of least privilege, ensuring that an application only gains access to the minimum necessary resources required for its functionality. This limits the blast radius if an access token is compromised.

How should refresh tokens be handled securely?

Refresh tokens should be treated with extreme care. They should be stored securely on the client side, ideally in HTTP-only cookies with strict SameSite policies for web applications, or in secure enclaves for mobile applications. They should also have a longer but still finite lifespan than access tokens, and the authorization server should implement mechanisms for immediate revocation if compromise is suspected. Each use of a refresh token should ideally be logged and monitored for suspicious activity.

What role do JSON Web Tokens (JWTs) play in OAuth 2.0 and OIDC?

JSON Web Tokens (JWTs) are a common, compact, and URL-safe means of representing claims between two parties. In OIDC, the ID Token is a JWT that contains claims about the authentication event and the user’s identity. In OAuth 2.0, access tokens can also be implemented as JWTs, containing claims about the granted permissions and the token’s validity. JWTs are typically signed to ensure their integrity and can be encrypted for confidentiality, though signing is more common for access tokens and ID tokens.

Cole Hernandez

Lead Security Architect M.S. Cybersecurity, CISSP, CISM

Cole Hernandez is a Lead Security Architect with fifteen years of dedicated experience fortifying digital infrastructures. Currently, he heads the threat intelligence division at AegisNet Solutions, specializing in advanced persistent threat detection and mitigation. His expertise lies in developing proactive defense strategies against state-sponsored cyber espionage. Hernandez is widely recognized for his groundbreaking work on the 'Quantum Shield' protocol, detailed in his seminal paper published in the Journal of Cyber Warfare