OWASP Top 10 API Security Risks – 2023: API4:2023 – Unrestricted Resource Consumption
Unrestricted resource consumption occurs when an API allows users or clients to request resources without proper limits or controls. Every API request consumes a certain amount of resources such as CPU cycles, memory, network bandwidth, storage, and other external services (e.g. email, SMS, or biometric validation). If these resources are not regulated, an attacker can exploit the API to consume disproportionate resources, leading to a range of undesirable consequences including:
Denial of Service (DoS): An attacker may cause the API to become unresponsive by overwhelming it with an excessive number of requests, or by requesting resources that are computationally expensive, leading to system crashes or slowdowns.
Inflated Operational Costs: APIs that involve third-party services, such as SMS or email delivery, may incur costs for each request. Without proper restrictions, malicious actors can generate high volumes of such requests, leading to unexpected cost overruns.
Data Loss or Degradation: APIs that allow unregulated access to large amounts of data or storage can be abused, resulting in slow system performance, data corruption, or loss.