API Security Risks
Excessive data exposure is when an API returns too much unnecessary information in a response. Too much sensitive data exposed could be taken advantage of by attackers. Data should always be filtered on the server side and never over-exposed on the client side.
Broken Authentication. Poorly implemented authentication could mean short, infrequently updated API keys, lack of access token validation, non-expiring JWTs, and more. It's essential always to use multifactor authentication and follow industry best practices.
Lack of resources and rate limiting. Without rate limiting, APIs are vulnerable to bots and DoS attacks that can break them by overloading them with requests. Effective rate limiting and payload size limits control the number of calls able to be made within a short amount of time, and excessive calls can be blocked.
Insufficient monitoring. A lack of consistent monitoring can lead to attackers going unnoticed while probing for weaknesses. For this reason, it's important to use monitoring and analysis tools that can provide details on clients and log events such as failed access attempts.
Broken-Object level Authorization(BOLA). BOLA happens when there is improper authorization when validating access to data objects. This is when an attacker imitates another user by modifying an API request and accessing another user's information via the API.