CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
3 real-world CVEs classified as CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2024-50379critical 9.82024
Apache Tomcat case-folding JSP compilation race
Concurrent resource reads and writes were not serialized, so differently cased paths that resolve to one file on a case-insensitive filesystem could race Tomcat's resource metadata and let content uploaded through the default servlet be compiled as JSP.
- CVE-2019-15126low 3.12020
KrØØk: disassociation drains queued Wi-Fi frames under a zero key
Affected FullMAC firmware clears a WPA2 session's temporal key when the station disassociates but still transmits frames left in the chip's transmit queue, encrypting those frames with an all-zero key that an adjacent observer can reproduce.
- CVE-2018-15664high 7.52019
docker cp symlink-exchange race (host filesystem escape)
A copy handler resolves a path safely inside the container root, then a separate filesystem operation re-opens that path, so a process inside the container can swap a component for a symlink in the gap and redirect the copy onto the host as root.