Race condition in the _get_masked_mode function in Lib/os.py in Python 3.2 through 3.5, when exist_ok is set to true and multiple threads are used, might allow local users to bypass intended file permissions by leveraging a separate application vulnerability before the umask has been set to the expected value.
Exploitability
AV:LAC:MAu:NImpact
C:PI:PA:N3.3/AV:L/AC:M/Au:N/C:P/I:P/A:N