In Paramiko before 2.10.1, a race condition (between creation and chmod) in the writeprivatekey_file function could allow unauthorized information disclosure.
"https://github.com/pypa/advisory-database/blob/main/vulns/paramiko/PYSEC-2022-166.yaml"