CVE-2023-28859: Redis Redis-py Race Condition Due To Vulnerability
HIGHCVE-2023-28859 is a HIGH (CVSS 6.5) redis-py race condition due to vulnerability (CWE-459: Incomplete Cleanup) affecting Redis libraries in the PyPI ecosystem. The issue involves redis-py race condition due to incomplete fix. Remediation is available by upgrading affected packages to version 4.5.4, 4.4.4.
CVE-2023-28859 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-28859
To remediate this vulnerability, upgrade all affected Redis dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install redis>=4.5.4
pip install redis>=4.4.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show redis
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-28859, inspect your installed packages using pip:
pip show redis
Analyze the terminal output to locate any version of Redis in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.4), your application is affected.
Note: The pip show redis command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-459: Incomplete Cleanup, where the product does not properly "clean up" and remove temporary or supporting resources after they have been used. In Redis, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-28859 Affected Redis Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
redis
|
PyPI |
≥ 4.5.0
< 4.5.4
|
4.5.4
|
|
redis
|
PyPI |
≥ 4.2.0
< 4.4.4
|
4.4.4
|
References
Frequently Asked Questions
What is CVE-2023-28859?
Which Redis versions are affected?
What version fixes CVE-2023-28859?
Is redis affected?
What is the CVSS score of CVE-2023-28859?
What CWE is associated with CVE-2023-28859?
How can I check PyPI dependencies for CVE-2023-28859?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8fww-64cx-x8p5",
"modified" : "2024-10-25T21:45:05Z",
"published" : "2023-03-26T21:30:23Z",
"aliases" : [ "CVE-2023-28859" ],
"summary" : "redis-py Race Condition due to incomplete fix",
"details" : "redis-py through 4.5.3 and 4.4.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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "redis"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.5.0"
}, {
"fixed" : "4.5.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "redis"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.4.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28859"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/issues/2665"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/pull/1899"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/pull/2641"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/pull/2666"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/pull/2671"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/commit/66a4d6b2a493dd3a20cc299ab5fef3c14baad965"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/commit/b3c89acd0ffe8303649ad8207bc911b1d6a033eb"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/redis/PYSEC-2023-46.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/redis/redis-py"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/releases/tag/v4.4.4"
}, {
"type" : "WEB",
"url" : "https://github.com/redis/redis-py/releases/tag/v4.5.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-459" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-27T21:31:52Z",
"nvd_published_at" : "2023-03-26T19:15:00Z"
}
}