CVE-2021-32626

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-32626
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-32626.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-32626
Aliases
Downstream
Related
Published
2021-10-04T18:15:08Z
Modified
2025-10-15T13:01:31.183135Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

Redis is an open source, in-memory database that persists on disk. In affected versions specially crafted Lua scripts executing in Redis can cause the heap-based Lua stack to be overflowed, due to incomplete checks for this condition. This can result with heap corruption and potentially remote code execution. This problem exists in all versions of Redis with Lua scripting support, starting from 2.6. The problem is fixed in versions 6.2.6, 6.0.16 and 5.0.14. For users unable to update an additional workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.

References

Affected packages

Git / github.com/redis/redis

Affected ranges

Type
GIT
Repo
https://github.com/redis/redis
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

1.*

1.3.6

2.*

2.2-alpha0
2.2-alpha1
2.2-alpha2
2.2-alpha3
2.2-alpha4
2.2-alpha5
2.2-alpha6
2.2.0-rc1
2.3-alpha0

3.*

3.0-alpha0

6.*

6.0-rc1
6.0-rc2
6.0-rc3
6.0-rc4
6.0.0
6.0.1
6.0.10
6.0.11
6.0.12
6.0.13
6.0.14
6.0.15
6.0.2
6.0.3
6.0.4
6.0.5
6.0.6
6.0.7
6.0.8
6.0.9

v1.*

v1.3.10
v1.3.11
v1.3.12
v1.3.7
v1.3.8
v1.3.9

v2.*

v2.0.0-rc1
v2.1.1-watch

Other

vm-playpen
with-deprecated-diskstore

Database specific

vanir_signatures

[
    {
        "signature_type": "Function",
        "id": "CVE-2021-32626-093b868b",
        "source": "https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591",
        "signature_version": "v1",
        "target": {
            "function": "redisProtocolToLuaType_Aggregate",
            "file": "src/scripting.c"
        },
        "digest": {
            "function_hash": "133471130975851938283878788364891376898",
            "length": 863.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2021-32626-2fa1f762",
        "source": "https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591",
        "signature_version": "v1",
        "target": {
            "file": "src/scripting.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "225837462722455056665973575322483484564",
                "332908368104229764027246929320768567349",
                "152776945611722238572901407709898753838",
                "231480258362443571104530391351668937168",
                "152080370687665431621498291127945022182",
                "270740102386829503022426859466281342572",
                "303153827806831169292224529846645274545",
                "111096043701500063345173966689129171899",
                "39240831861994024281922214699553808970",
                "330576521664161525037836581328295755166",
                "210400014251288815407293396960932897067",
                "31711018281809647491546303661330920486",
                "27809397099589564893711104080372011224",
                "300570996866144592240027126609497643737",
                "23550491109422937495687699410202655599",
                "266990753237110601284265085322002239266",
                "30842747934058892533011444427297585712",
                "238725859220939564723884504129625935467",
                "232925004472148321596428057799505273350",
                "95153295205331336103429842831060433078",
                "2434405222589226196843580275261345084",
                "5606702997388659880226569347691655561",
                "51070930043237854372639175997016953215",
                "146095602914262560114489503248955746643",
                "326384158911161488728797923221966740745",
                "199417308474835970051138777521342048511",
                "257737864698129123593191746325375276470",
                "122974677492190725212865591708036728339",
                "6902884647233111978342316538775061291",
                "52281844437206714142186794519372494664"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2021-32626-5ff0e58f",
        "source": "https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591",
        "signature_version": "v1",
        "target": {
            "function": "redisProtocolToLuaType",
            "file": "src/scripting.c"
        },
        "digest": {
            "function_hash": "43734288659794077213806939880441679106",
            "length": 686.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2021-32626-bf809c62",
        "source": "https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591",
        "signature_version": "v1",
        "target": {
            "function": "ldbRedis",
            "file": "src/scripting.c"
        },
        "digest": {
            "function_hash": "289367307775234806490099118334869407297",
            "length": 489.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2021-32626-de30d6f0",
        "source": "https://github.com/redis/redis/commit/666ed7facf4524bf6d19b11b20faa2cf93fdf591",
        "signature_version": "v1",
        "target": {
            "function": "luaReplyToRedisReply",
            "file": "src/scripting.c"
        },
        "digest": {
            "function_hash": "187428791625482201220890903900588121737",
            "length": 2672.0
        },
        "deprecated": false
    }
]