Race Condition
Also called TOCTOU.
A timing flaw between check and use that an attacker abuses.
What it is
A flaw where the security of an operation depends on the timing of events, classically a gap between when a resource is checked and when it is used (time-of-check to time-of-use). An attacker changes the resource in that window.
Why it matters
Race conditions enable privilege escalation and bypass of validation that looked correct in isolation. They are intermittent and timing-dependent, making them hard to reproduce and easy to overlook in review.
In practice
A program verifies a file path is safe, then opens it a moment later, and the attacker swaps the path for a symlink to a sensitive file in between.
What to look for
- Time of check to time of use gaps in file or permission checks.
- Bugs that only reproduce under load.
- Temp files created with predictable names.
Common mistake
Testing once and calling it fixed. Races need repeated, parallel testing.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- Risk Scoring
Score a vulnerability with CVSS v3.1, or an incident across five dimensions, and see the reasoning behind each number.
- Map and Score
Map real procedures to ATT&CK techniques, then pick the CVSS v3.1 metrics for real vulnerabilities.
Read next
- Local Privilege Escalation: Gaining higher privileges from an existing local foothold.
- Path Traversal: Using crafted paths to reach files outside the intended directory.
- Broken Access Control: Failure to enforce what authenticated users are allowed to do.