Top API Security Vulnerabilities

Srinivas Kolaparthi
2 min readNov 8, 2022

An API is a set of programming codes that enables data transmission between one software product and another. From banks, retail, and transportation to IoT, autonomous vehicles, and smart cities, APIs are a critical part of modern mobile, SaaS, and web applications and can be found in customer-facing, partner-facing, and internal applications.

APIs expose application logic and sensitive data such as Personally Identifiable Information and because of this have increasingly become a target for attackers.

As the value of APIs increases in our daily lives, these touchpoints become more vulnerable to attack.

OWASP top 10 API security vulnerabilities

1)Broken Object Level Authorization:
Since APIs enable access to objects, if authorization is broken there is a wide attack area. Thus, authorization to API-accessible objects must be secured. To prevent unauthorized access, we can use an API gateway and implement object-level authorization.

2)Broken User Authentication:
Secure user authentication, and only ensure trusted users are authenticated. Go beyond simple API keys with OAuth flows. Always consider the type of access. If it’s machine-to-machine access, consider adding additional layers of security such as Mutual TLS together with OAuth MTLS Sender Constrained Tokens to ensure that clients don’t misbehave and pass tokens to the wrong party.

3)Excessive Data Exposure:
As a rule of thumb, limit data exposure to only trusted parties who need it. By using OAuth Scopes and Claims, developers can delineate exactly who is eligible to access what.

4)Lack of Resources & Rate Limiting:
DoS attacks are a common brute force method used by black hats to overload a server and effectively snuff out a server’s uptime. Put rate limits on APIs using an API gateway or management solution. Put restrictions on responses, and implement things like filtering and pagination.

5)Broken Function Level Authorization:
Adopt OpenID Connect to help standardize user identity creation and maintenance. Avoid in-house development, and outsource access management systems to specialized tooling. Developers can also mitigate this vulnerability by adopting Scopes and Claims.

6)Mass Assignment.
7)Security Misconfiguration:
Incomplete and inaccurate configurations might lead to attacks. Use Pairwise Pseudonyms in tokens to not leak identity data outside the system.

8)Injection:
Not only are APIs prone to injection, but third-party developer applications may be prone to injection as well. Always use an API Gateway. Do not allow SQL and untrusted data types as accepted data formats. Monitor API requests from trusted parties for unusual behavior.

9)Improper Assets Management:
It is important to maintain versions and documents up to date to avoid security issues.

10)Insufficient logging and Monitoring: When an attack does occur, teams need an efficient response plan. Lacking a consistent logging and monitoring system means developers.

For more info: https://wordpress.com/posts/skolaparthi.com

--

--

Srinivas Kolaparthi

I am a Trainer By Profession. I deliver DevOps, Microservices, Cloud, and Salesforce. Website: https://skolaparthi.com