An application verifies resource attributes once but does not verify them again before use. Is this behavior considered a possible synchronization flaw if a malicious user changes the resource after the initial verification?
The behavior can lead to a time-of-check/time-of-use (TOCTOU) flaw. After the initial verification, an attacker could swap or modify what was verified, creating a race condition in which the application’s later logic no longer matches the originally verified resource state. If the resource is not re-verified, the application may process altered data or grant unintended access. Some might think verifying once is enough, but without repeated checks, the application is exposed to covert changes that happen after the initial verification.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a TOCTOU flaw?
Open an interactive chat with Bash
What are race conditions in software security?
Open an interactive chat with Bash
How can applications prevent TOCTOU vulnerabilities?