Bug 2080286 (CVE-2022-24735)

Summary: CVE-2022-24735 redis: Code injection via Lua script execution environment
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: agerstmayr, aileenc, amackenz, amasferr, apevec, bcoca, bdettelb, caswilli, chazlett, chousekn, cmeyers, davidn, dhalasz, drieden, eglynn, fabian.deutsch, fedora, fpercoco, gblomqui, ggaughan, gmalinko, gparvin, hhorak, jal233, janstey, jcammara, jhardy, jjoyce, jobarker, jochrist, jorton, jramanat, jwong, jwon, kaycoth, lhh, mabashia, mburns, mgoodwin, micjohns, mkudlej, nathans, njean, notting, osapryki, pahickey, pdelbell, rcollet, redis-maint, relrod, rhos-maint, rpetrell, sdoran, smcdonal, spower, stcannon, sthirugn, tjochec, tkuratom, vkrizan, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: redis 7.0.0, redis 6.2.7 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Redis database where Lua scripts can be manipulated to overcome ACL rules. This flaw allows an attacker with access to Redis to inject Lua code that executes the potentially higher privileges of another Redis user.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-04 21:03:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2090363, 2090365, 2080287, 2080288, 2080877, 2080878, 2080879, 2080880, 2080881, 2090364, 2090366    
Bug Blocks: 2080292    

Description Pedro Sampaio 2022-04-29 12:40:22 UTC
Redis is an in-memory database that persists on disk. By exploiting weaknesses in the Lua script execution environment, an attacker with access to Redis prior to version 7.0.0 or 6.2.7 can inject Lua code that will execute with the (potentially higher) privileges of another Redis user. The Lua script execution environment in Redis provides some measures that prevent a script from creating side effects that persist and can affect the execution of the same, or different script, at a later time. Several weaknesses of these measures have been publicly known for a long time, but they had no security impact as the Redis security model did not endorse the concept of users or privileges. With the introduction of ACLs in Redis 6.0, these weaknesses can be exploited by a less privileged users to inject Lua code that will execute at a later time, when a privileged user executes a Lua script. The problem is fixed in Redis versions 7.0.0 and 6.2.7. An additional workaround to mitigate this problem without patching the redis-server executable, if Lua scripting is not being used, is to block access to `SCRIPT LOAD` and `EVAL` commands using ACL rules.

References:

https://github.com/redis/redis/pull/10651
https://github.com/redis/redis/security/advisories/GHSA-647m-2wmq-qmvq
https://github.com/redis/redis/releases/tag/7.0.0
https://github.com/redis/redis/releases/tag/6.2.7

Comment 1 Pedro Sampaio 2022-04-29 12:40:48 UTC
Created redis tracking bugs for this issue:

Affects: epel-7 [bug 2080288]
Affects: fedora-all [bug 2080287]

Comment 5 errata-xmlrpc 2022-11-08 09:31:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7541 https://access.redhat.com/errata/RHSA-2022:7541

Comment 6 errata-xmlrpc 2022-11-15 10:14:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8096 https://access.redhat.com/errata/RHSA-2022:8096

Comment 7 Product Security DevOps Team 2022-12-04 21:03:25 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-24735