Skip to main content

API Security

Definition

API security protects Application Programming Interfaces (APIs) against attacks and misuse. APIs are the backbone of modern applications but also a popular target for attackers.

API security protects Application Programming Interfaces (APIs) against attacks, misuse and data leakage. APIs are the backbone of modern applications, connecting front-ends, back-ends, mobile apps and cloud services. According to Salt Security, the number of API attacks in 2023 increased by 400% compared to the previous year.

How does API security work?

APIs expose functionality and data to external and internal consumers via standardised interfaces. Every API endpoint is a potential attack surface. API security encompasses authentication (who is calling the API?), authorisation (what is this user allowed to do?), input validation (is the input valid and safe?), rate limiting (how many requests per time unit?), encryption (is data in transit protected?) and logging (which API calls are being made?). API gateways centralise these security functions.

OWASP API Security Top 10

The most critical API vulnerabilities according to OWASP include: Broken Object Level Authorization where attackers access other users' data by manipulating object IDs. Broken Authentication through weak or missing authentication mechanisms. Broken Object Property Level Authorization with excessive data exposure. Unrestricted Resource Consumption due to missing rate limiting. Broken Function Level Authorization, Server Side Request Forgery and Security Misconfiguration.

Impact on organisations

The explosive growth of APIs in microservices architectures, mobile apps and cloud platforms drastically increases the attack surface. Many organisations lack visibility into how many APIs they have (API sprawl) and what data these expose. Data breaches via APIs increasingly affect large organisations. NIS2 requires adequate security of all digital interfaces. The CRA sets requirements for API security in digital products.

Protection

Implement an API gateway with authentication, authorisation and rate limiting. Use OAuth 2.0 and OpenID Connect for standardised authentication. Strictly validate all input. Implement API inventory and lifecycle management. Conduct regular API pentests. Use API-specific WAF rules. Monitor API traffic for anomalous behaviour.

How DEFION helps

DEFION conducts specialised API pentests as part of Web Application Pentests. The team tests API endpoints against the OWASP API Security Top 10 and delivers concrete improvement recommendations.

Related terms

Pentest Zero Trust SQL Injection