# CVE-2023-28859: redis-py Race Condition due to incomplete fix

Source: https://junglewise.ai/threats/cve-2023-28859-redis-py-race-condition-due-to-incomplete-fix  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-03-26  
License: CC BY 4.0 with a link back

CVE-2023-28859 · Severity: low · CVSS 3.1 · Published 2023-03-26

redis-py through 4.5.3 leaves a connection open after canceling an async Redis command at an inopportune time (in the case of a non-pipeline operation), and can send response data to the client of an unrelated request. NOTE: this issue exists because of an incomplete fix for CVE-2023-28858.

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

## Quick answers

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

**How severe is CVE-2023-28859?** Low severity, with a CVSS score of 3.1, published 26 March 2023.

**Which products and versions are affected?** redis (PyPI) ECOSYSTEM:introduced=4.2.0,fixed=4.4.4,introduced=4.5.0,fixed=4.5.4, ECOSYSTEM:introduced=4.5.0,fixed=4.5.4.

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

**Am I affected by CVE-2023-28859?** Check whether you run redis (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

- redis (PyPI): upgrade to 4.5.4 or later

  ```sh
  pip install "redis>=4.5.4"
  ```


## Affected products

- redis (PyPI) ECOSYSTEM:introduced=4.2.0,fixed=4.4.4,introduced=4.5.0,fixed=4.5.4, ECOSYSTEM:introduced=4.5.0,fixed=4.5.4

## Identifiers

- CVE-2023-28859
- GHSA-8fww-64cx-x8p5
- PYSEC-2023-46

## Related threats

- [PYSEC-2023-312 - Redis before 6cbea7d allows a replica to cause an assertion failure in a primary server by sending a…](https://junglewise.ai/threats/pysec-2023-312-redis-before-6cbea7d-allows-a-replica-to-cause-an-706884d8)
- [PYSEC-2023-73 - redis-7.0.10 was discovered to contain a segmentation violation.](https://junglewise.ai/threats/pysec-2023-73-redis-7-0-10-was-discovered-to-contain-a-segmentation-464b01b0)
- [redis-py race condition in async command handling](https://junglewise.ai/threats/cve-2023-28858-redis-py-race-condition-in-async-command-handling)
- [PYSEC-2022-43162 - Redis v7.0 was discovered to contain a memory leak via the component streamGetEdgeID.](https://junglewise.ai/threats/pysec-2022-43162-redis-v7-0-was-discovered-to-contain-a-memory-leak-via-68366c0a)
