OWASPASVS 5.0 requirement
ASVS-V15.4.2 Checks on a resource's state, such as its existence or permissions, and the actions that depend on them are performed as a single atomic…
- Standard
- OWASP ASVS 5.0
- Chapter
- V15 Secure Coding and Architecture
- Section
- V15.4 Safe Concurrency
- Level
- L3 (requirement applies from this verification level up)
Requirement
Verify that checks on a resource's state, such as its existence or permissions, and the actions that depend on them are performed as a single atomic operation to prevent time-of-check to time-of-use (TOCTOU) race conditions. For example, checking if a file exists before opening it, or verifying a user’s access before granting it.