eBook API eBook API Security Blueprint v3 - 2025

API SECURITY

How to build out a successful API Security program for your enterprise. Leverage your existing infrastructure, development and security teams for success.


API SECURITY BLUEPRINT

INTRODUCTION

APIs are a core building block of every enterprise’s connectivity and digital strategy, yet they are also the number one attack surface for hackers. The explosion in the volume of APIs over the past ten years has1 put such strains on traditional security and API management approaches that they are failing everyday as the scale and reach of API attacks increases.

The industry’s leading API security community newsletter, apisecurity.io, has been curating these attacks on a weekly basis since 2018. It documents the ever increasing number and losses enterprises accruing from these attacks.

A recent Forbes article points out that it’s time to take the API security threat more seriously because, “...ops and security teams lack a systematic way to spot, prevent and respond to API-based attacks” .2

As regulations around data privacy (such as GDPR, CCPA) and industry-specific compliance standards (such as HIPAA or PCI-DSS) become more stringent, API security has become critical for ensuring compliance. Engineers are now tasked not only with creating secure APIs but also ensuring those APIs adhere to necessary standards for data protection and privacy. Failure to secure APIs adequately could result in severe financial penalties, reputational damage, and even legal consequences for the enterprise. This makes API security a shared responsibility across engineering, security, and compliance teams. Adding to the complexity, emerging technologies like GenAI are expected to become major consumers of APIs, making API security even more critical. With the risks and consequences of an API breach continuing to grow, it’s more important than ever to cut through the noise and focus on proven solutions.

In this ebook we set out how enterprises can adopt a systematic approach to implementing API security at scale. It is a blueprint for how your organization should adopt a true DevSecOps Security program by implementing the right processes and tools for developers, operations and security teams to ensure a scalable, long lasting and automated protection of your APIs today and tomorrow.

THE LATEST API SECURITY NEWS, VULNERABILITIES AND BEST PRACTICES

The API Explosion

1995 2000 2005 2010 2015 Today

APPLICATION

BY 2026

more than 80% of enterprises will have used generative AI APIs or models, and/or deployed GenAI-enabled applications in production environment, up from less than 5% in 2023.3

APPLICATION SECURITY TEAMS

the average cost of a data breach in 2024 was $4.88m, an increase of 10% over 2023, and the highest total ever.4


API SECURITY BLUEPRINT TABLE OF CONTENT

WHAT IS API SECURITY?

01

WHAT APIS DO YOU HAVE?

02

WHAT ARE YOUR API RISKS?

03

GETTING STARTED

04

API BREACHES

05

SIX DOMAINS OF API SECURITY

06

API INVENTORY

07

API DESIGN

08

API DEVELOPMENT

09

API TESTING

10

API PROTECTION

11

API GOVERNANCE

12

QUICK WINS FOR IMPROVING API SECURITY

13

CONCLUSION

14

RESOURCES

15

REFERENCES

16


API SECURITY BUILT UPON A SOLID FOUNDATION

A successful API security initiative is ideally built upon a solid foundation of a sound DevOps practice and a balanced AppSec program.

Just like a house, the strength of the overall structure is dependent on a solid foundation — without these in place, an API security initiative may prove challenging.

Similarly, it is imperative that dedicated API security solutions are deployed in addition to AppSec tools to provide the optimum coverage and protection specific to APIs.

API management portals and gateways are essential to the operation of APIs at scale, and security features should be leveraged to provide another layer of protection.

A dedicated API Security platform is essential as the ultimate layer of defense allowing for:

A well-established AppSec process is vital to ensure that basic coding and implementation errors are detected in the build process.

Traditional security tools (WAF, SAST, DAST) are not specifically tailored for API development and are likely to lead to gaps in coverage.

DevOps emphasizes collaboration between Development and Operations teams to ensure high-velocity delivery of quality applications in a repeatable, automated manner.


API SECURITY BLUEPRINT

UNDERSTANDING YOUR API INVENTORY

THE DIFFERENT TYPES OF API

EXTERNAL APIs

These are authenticated public-facing APIs accessible via the internet. Typically, these APIs serve customers and consumers, or mobile and web applications. These APIs are critical since they are public-facing and expose critical, sensitive data. Strong authentication and authorization are key for these APIs.

PARTNER APIs

These are APIs to enable specific partner functionality and have more restricted access than external APIs. For partner APIs pay attention to data privacy requirements.

INTERNAL APIs

These are APIs accessible only via private, internal networks. Typically, these APIs enable interoperation between various internal business applications. Security is still key for these APIs — assume that in time all internal APIs will become external. Do not rely on traditional perimeter protections.

PUBLIC APIs

These are open access public-facing APIs accessible via the internet. Typically, these APIs serve unauthenticated information or status information for public consumption. For these APIs focus on availability considerations such as rate limiting and usage quotas.


PRIORITIZING YOUR API INVENTORY

Starting your API security journey requires a focused effort on your entire API inventory, starting with your most critical APIs. To determine the priority, perform the following three assessments:

  1. Assess the network access to the API; public APIs are at the highest risk, and isolated networks the lowest risk.
  2. Assess the data sensitivity or classification; medical or patient data is at the highest risk, and information in the public domain is at the lowest risk.
  3. Assess the access control to the API; unauthenticated access is the highest risk, and strongly authenticated via OAuth2 or similar is the lowest risk.

Once a rating has been determined for each of the three categories this can be combined to provide an approximate overall risk rating which determines priority. Start at the top, and work through the inventory.

Category NETWORK ACCESS DATA SENSITIVITY ACCESS CONTROL PRIORITY
Public 1 1 1 1
VPN 2 2 2 2
Internal 3 3 3 3
Isolated subnet 4 4 4 4
Medical 1 1 1 1
Financial 2 2 2 2
PII 3 3 3 3
Public 4 4 4 4
Unauthenticated 1 1 1 1
Basic Auth 2 2 2 2
API key 3 3 3 3
OAuth2/ OIDC 4 4 4 4
Highest 1 1 1 1
Lowest 4 4 4 4

WHO IS ATTACKING YOUR APIS?

”SCRIPT KIDDIES”

Generally lower skilled attackers utilizing publicly available tools to attack APIs either for mischief or notoriety.

SCRAPERS AND BOTS

Scrapers can exfiltrate data via APIs for reselling, and bot farms can launch sophisticated large-scale attacks against public APIs.

HACKERS

This is the most dangerous attacker – highly skilled with advanced techniques. They are usually incentivized for financial gain or political/social motives.

THE DANGERS IN YOUR API INVENTORY

SHADOW APIs

These APIs are invisible to the security team — usually built in a clandestine manner to meet urgent business requirements. Public cloud adoption has driven shadow IT and represents an unquantified risk to an organization.

ZOMBIE APIs

This API is typically a deprecated or outdated API that remains active to support legacy systems. Often these APIs are not maintained or patched representing a significant risk to an organization.

MISCONFIGURED APIs

Cloud infrastructure and frameworks have fueled API growth, however, the complexities of these environments often result in APIs that are misconfigured (insecure defaults, missing security controls, etc.).

“FRANKENSTEIN” APIs

Similar to shadow APIs, these are developed in a non-standard fashion often outside of standard governance and security processes resulting in increased risk.


04 API SECURITY BLUEPRINT HIGH PROFILE API BREACHES PAGE 05
WHO? HOW IT HAPPENED? WHAT WAS THE IMPACT?
GLOBAL SHIPPING COMPANY Researchers discovered they could automatically submit parcel numbers to an API that retrieved a map image. They then used this image to guess the postcode and then were able to retrieve full parcel information and extended user information. The underlying causes were the lack of rate-limiting on the parcel number API, and excessive information exposure leading to leakage of customer PII. Potentially large-scale exfiltration of customer PII and parcel tracking information. Researchers reported responsibly and a fix was released before exploitation. The vulnerability was disclosed after all systems were patched.
CRYPTOCURRENCY TRADING PLATFORM A researcher discovered an issue in a cryptocurrency trading platform whereby he could trade between two different accounts. The platforms failed to validate the account details and allowed purchases from accounts with insufficient funds. The exploit could be triggered by manipulating API request parameters. The underlying cause was a text-book case of broken-object level authorization allowing manipulation via an API parameter. In this case, the impact was fortunately limited due to responsible disclosure and immediate response. The researcher received a substantial bounty of $250,000.
INSURANCE COMPANY A researcher discovered an assortment of API vulnerabilities can be chained together to totally compromise an affected platform. This vulnerability is a great example of how multiple weaknesses can be chained together to totally compromise a system. In this case, the following issues were discovered: UUID leakage, broken object-level authorization, broken function-level authorization, poor JWT validation, secrets committed to source code repositories, and leakage of API tokens via web UI. In this case, the security researcher worked with the company to verify the vulnerability and worked together on the remediation within a very short timescale. No breach of data was reported, and a small bounty was paid to the researcher.

DevSecOps CYCLE

API INVENTORY

Do you understand what APIs you own? Have you reviewed code repositories? Do you track shadow and zombie APIs?

API DESIGN

Are you doing API-design-first? Do you incorporate security into the design phase?

API DEVELOPMENT

Have you implemented a secure-by-design approach? Are your developers trained to code securely? Do they understand API security threats and risks?

API TESTING

Are you doing automated API testing? Are you considering security in your test strategy?

API PROTECTION

Are you using API protection technology (WAFs, WAAPs, API gateways) in your deployments?

API GOVERNANCE

Do you control and actively monitor your API estate and environments?


API SECURITY BLUEPRINT

SIX DOMAINS OF API SECURITY?

CORE DOMAINS OF API SECURITY

API DESIGN

WHAT IS IT?

A solid API design practice is the foundation of usable, scalable, documented and secure APIs. Key elements of secure API design include:

Additionally, API design teams should perform threat modeling exercises to understand their threat environment and attack surface.

WHY IT MATTERS?

It is significantly more cost effective to address security issues at the design phase, rather than later in the lifecycle — a shift-left approach is key.

API DEVELOPMENT

WHAT IS IT?

A crucial element of secure APIs is the development process where specifications are implemented in live APIs. Key considerations here are:

WHY IT MATTERS?

This vital stage is where the rubber meets the road — developers should ensure they are following security best practice to avoid introducing vulnerabilities into APIs.

API TESTING

WHAT IS IT?

API security testing is vital to ensure that APIs are verified as secure before deployment. Security testing should be tightly integrated into the CI/CD process and should avoid any manual effort. Tests should be able to ‘break the build’ in event of failure. The following aspects should be tested:

WHY IT MATTERS?

Without adequate API security testing an organization runs the risk of deploying insecure APIs — test early, test often, test everywhere.


API SECURITY BLUEPRINT

WHERE IS YOUR API SECURITY TODAY?

INCREASING API SECURITY MATURITY

API INVENTORY API DESIGN API DEVELOPMENT API TESTING API PROTECTION API GOVERNANCE
Basic inventory maintained via spreadsheet or manual tracking. No management of shadow/zombie APIs. No formal API design process in place, instead a code-first method is used. No upfront consideration of security concerns, threats, compliance, data privacy. Developers are largely unaware of security concerns in API development or approaches to secure code in general. No specific API security testing is performed, with only functional testing in place. No specific API runtime protection is implemented, the only protection in place is standard firewalls or WAFs. API development is largely ungoverned with business units each using their own process with no central oversight.
Inventory maintained via API Management or centralized platform. Standard process for new API development. APIs are developed using a design-first approach based on OAS definitions. Security concerns are addressed on an ad-hoc basis with no standard process. Developers have a familiarity with security considerations and use secure coding practices albeit sporadically. API security testing is performed using largely manual testing, and lacks automation and CI/CD integration. Some protection is provided typically using API gateways to provide basic enforcement of rate-limiting, token validation, etc. Governance addresses only the basic requirements of compliance and regulatory requirements.
Inventory actively tracked via centralized platform, shadow and zombie APIs deprecated, and upgraded. Security a first-class element of API design including standard patterns/practices, including threat modeling. Developers are fully versed in secure code and API security topics, and proactively seek to use best-practice, and defensive coding. API security testing is tightly integrated into all stages of the SDLC, and failures can block releases. Dedicated API firewalls are implemented to provide localized protection at the API transaction level. Governance is proactive and APIs are developed to a standard process. Deviations are tracked, and discrepancies addressed.

API SECURITY BLUEPRINT

BUILDING AN API SECURITY PROGRAM

KEY COMPONENTS OF THE SECURE API SDLC

COMPONENT DESCRIPTION
Developer Training Developer-focused awareness and API security training curriculum available to all API developers.
Security Audits Audit all OAS definitions immediately as they are being written in the IDE, or within the CI/CD pipeline, and drive remediation of issues identified.
Conformance Scanning Continuously validate the accuracy and completeness of the implemented logs into central SIEM solutions, and ensure API events of interest are managed within the SOC.
API Gateway Utilize API gateway and management platforms to provide monitoring and management of external APIs, ensuring security policies are applied appropriately.

QUICK WINS FOR IMPROVING API SECURITY

QUICK WINS FOR IMPROVING API SECURITY

ALWAYS USE TLS

Transport Layer Security should no longer be considered a “nice-to-have” and should be enforced as a standard for all API endpoints. Care should be taken to correctly configure security headers and transport security, thus ensuring that a certificate rotation process is in place.

USE OAUTH2 FOR SSO

Poorly implemented authentication and authorization rank highest on the OWASP API Security Top 10. Developers should resist the temptation to invent their workflows for the issuance and revocation of tokens. This is so that they can leverage the collective wisdom behind the OAuth 2.0 standard.

PRACTICE GOOD HYGIENE WITH API KEYS AND TOKENS

Once a key or token has been obtained, developers should ensure they are practicing good hygiene, including the following:

ELIMINATE UNUSED METHODS ON ENDPOINTS

A quick win in reducing the attack surface on an API is to remove unused methods (i.e., HTTP methods typically such as DELETE, OPTIONS, PATCH, etc.). Depending on the framework used, invalid methods may be invoked on an endpoint causing unexpected behavior.

APPLY QUOTAS AND RATE LIMITING

The abuse of APIs can result in denial-of-service attacks or allow large-scale data exfiltration. Endpoints should use both quotas to limit excessive use or rate limiting to reduce abuse cases. Such defenses can be implemented in code, but ideally, they should also be implemented at a firewall or gateway level.

USE API FIREWALLS AND GATEWAYS

Low-hanging fruit for API security — all cloud platforms offer API gateway services, and these should be enabled with strong baseline policies applied, e.g., rate limiting and transport security.


API SECURITY BLUEPRINT

API INVENTORY SECURITY ASSESSMENT

Gain forensic visibility and insights to the quality of your enterprise API Estate.