# CVE-2022-24302: Race Condition in Paramiko

Source: https://junglewise.ai/threats/cve-2022-24302-race-condition-in-paramiko  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-03-17  
License: CC BY 4.0 with a link back

CVE-2022-24302 · Severity: low · CVSS 3.1 · Published 2022-03-17

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.

Technologies: [paramiko (PyPI)](https://junglewise.ai/threats/technologies/pypi-paramiko). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2022-24302 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-24302 being exploited in the wild.

**How severe is CVE-2022-24302?** Low severity, with a CVSS score of 3.1, published 17 March 2022.

**Which products and versions are affected?** paramiko (PyPI) ECOSYSTEM:introduced=0,fixed=2.9.3,introduced=2.10.0,fixed=2.10.1, ECOSYSTEM:introduced=2.10.0,fixed=2.10.1.

**Is there a fix for CVE-2022-24302?** Yes. paramiko (PyPI): upgrade to 2.10.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2022-24302?** Check whether you run paramiko (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- paramiko (PyPI): upgrade to 2.10.1 or later

  ```sh
  pip install "paramiko>=2.10.1"
  ```


## Affected products

- paramiko (PyPI) ECOSYSTEM:introduced=0,fixed=2.9.3,introduced=2.10.0,fixed=2.10.1, ECOSYSTEM:introduced=2.10.0,fixed=2.10.1

## Identifiers

- CVE-2022-24302
- GHSA-f8q4-jwww-x3wv
- PYSEC-2022-166

## Related threats

- [Paramiko use of broken SHA-1 algorithm in RSA key handling](https://junglewise.ai/threats/cve-2026-44405-paramiko-use-of-broken-sha-1-algorithm-in-rsa-key-handling)
- [OpenSSH and others SSH prefix truncation vulnerability (Terrapin)](https://junglewise.ai/threats/cve-2023-48795-openssh-and-others-ssh-prefix-truncation-vulnerability-terrapin)
- [Paramiko Authentication Bypass vulnerability](https://junglewise.ai/threats/cve-2018-1000805-paramiko-authentication-bypass-vulnerability)
- [Paramiko authentication bypass in SSH server implementation](https://junglewise.ai/threats/cve-2018-7750-paramiko-authentication-bypass-in-ssh-server-implementation)
- [Paramiko Unsafe randomness usage may allow access to sensitive information](https://junglewise.ai/threats/cve-2008-0299-paramiko-unsafe-randomness-usage-may-allow-access-to-sensitive)
