TIMING ATTACKS
INFORMATION DISCLOSURES
leveraging the differences in response delays, a threat actor can uncover information they should not have access to. For example, timing differences can be used to enumerate the usernames of an application, making it easier to stage a password-guessing attack and gain access to accounts.
RACE CONDITIONS
similar to business logic flaws in that a threat actor can cause the application to perform unintended actions. However, the issue's root cause is how the web application processes requests, making it possible to cause the race condition. For example, if we send the same coupon request several times simultaneously, it might be possible to apply it more than once.
MITIGATIONS
Use Atomic Transactions: implement atomic database transactions to ensure that all steps of a fund transfer (deducting and crediting balances) are performed as a single unit. This ensures that either all steps of the transaction succeed or none do, preventing partial updates that could lead to an inconsistent state.
Implement Mutex Locks: Mutex Locks ensures that only one thread accesses the shared resource (such as the account balance) at a time. This would prevent multiple requests from interfering with each other during concurrent transactions.
Apply Rate Limits: implementing rate limits on critical functions like funds transfers and withdrawals would limit the number of requests processed within a specific time frame, reducing the risk of abuse through rapid, repeated requests.
Last updated