The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.

Impact: Alter Execution LogicUnexpected State
The attacker can gain access to otherwise unauthorized resources.
Impact: Modify Application DataModify Files or DirectoriesModify MemoryOther
Race conditions such as this kind may be employed to gain read or write access to resources which are not normally readable or writable by the user in question.
Impact: Other
The resource in question, or other resources (through the corrupted one), may be changed in undesirable ways by a malicious user.
Impact: Hide Activities
If a file or other resource is written in this method, as opposed to in a valid way, logging of the activity may not occur.
Impact: Other
In some cases it may be possible to delete files a malicious user might not otherwise have access to, such as log files.
Impact: Unexpected State
The product may perform invalid actions when the resource is in an unexpected state.
ccphp
//resolve file if its a symbolic link* if(is_link($filename)){ ``` $filename = readlink($filename); } if(fileowner($filename) == $user){ echo file_get_contents($realFile); return; } else{ echo 'Access denied'; return false; } }
cMedium