chownr is vulnerable to the time of check to time of use (TOCTOU) race condition.The library uses predictable filenames in /tmp
, allowing a malicious user to change the group ownership of an arbitrary file by replacing a non-symlink file with a symlink file during the execution of the chown
command.