high CVSS 8.5 EPSS 2.7% Public exploit available

CVE-2018-12326·Redis vulnerability

Buffer overflow in redis-cli of Redis before 4.0.10 and 5.x before 5.0 RC3 allows an attacker to achieve code execution and escalate to higher privileges via a crafted command line. NOTE: It is unclear whether there are any common situations in which redis-cli is used with, for example, a -h (aka hostname) argument from an untrusted source.

Severity
high
Software
Redis
Fixed in
5:4.0.10-1
Published

How likely is exploitation

FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 2.7% — higher than 85% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.

Affected versions

Until: 5:4.0.10-1

Fixed in: 5:4.0.10-1

How to fix this CVE

Update Redis to version 4.0.10 or later to patch a critical buffer overflow in redis-cli that can lead to arbitrary code execution. This vulnerability affects command-line argument parsing, so administrators should prioritize upgrading promptly, especially in environments where redis-cli is invoked programmatically or through automation scripts.

sudo dnf update redis

Defensia detects this vulnerability

How to check if you are affected

  1. Check installed Redis version: redis-server --version or redis-cli INFO server | grep redis_version
  2. Verify redis-cli is installed and in PATH: which redis-cli && redis-cli --version
  3. Search for redis-cli processes with suspicious arguments: ps aux | grep redis-cli
  4. Confirm patched version after update: redis-cli INFO server and verify version is 4.0.10 or higher

FAQ

What is CVE-2018-12326?

A buffer overflow vulnerability in Redis redis-cli allows attackers to execute arbitrary code by crafting malicious command-line arguments. The vulnerability exists in how redis-cli processes hostname and other parameters without proper bounds checking.

Is CVE-2018-12326 being actively exploited?

While CVE-2018-12326 is not listed on the CISA KEV catalog as actively exploited, public exploits are available, making it a realistic threat in environments where redis-cli is exposed to untrusted input sources.

What versions of Redis are affected by CVE-2018-12326?

Redis versions before 4.0.10 and 5.x versions before 5.0 RC3 are affected. This includes all 4.0.x releases up to 4.0.9 and early 5.x development builds.

How do I check if my server is vulnerable to CVE-2018-12326?

Run 'redis-cli --version' and compare the output. If the version is below 4.0.10 or between 5.0-dev and 5.0 RC2, the system is vulnerable.

Does Defensia detect CVE-2018-12326?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Redis is installed on a monitored server, CVE-2018-12326 will appear in your dashboard with remediation steps.

Related Redis CVEs

CVE-2022-0543CVSS 10It was discovered, that redis, a persistent key-value database, due to a packaging issue, is prone to a (Debian-specific) Lua sandbox escape, which could result in remote code execution.
CVE-2026-23479CVSS 8.8Redis is an in-memory data structure store. In redis-server from 7.2.0 until 8.6.3, the unblock client flow does not handle an error return from `processCommandAndResetClient` when re-executing a blocked command. If a blocked client is evicted during this flow, an authenticated attacker can trigger a use-after-free that may lead to remote code execution. This has been patched in version 8.6.3.
CVE-2026-25243CVSS 8.8Redis is an in-memory data structure store. In versions of redis-server up to 8.6.3, the RESTORE command does not properly validate serialized values. An authenticated attacker with permission to execute RESTORE can supply a crafted serialized payload that triggers invalid memory access and may lead to remote code execution. A workaround is to restrict access to the RESTORE command with ACL rules. This is patched in version 8.6.3.
CVE-2026-66373CVSS 8.5Redis before 8.8.0, in the unusual case where an authenticated attacker can execute RESTORE, allows remote code execution via a RESTORE payload where the same NACK (pending entry) is referenced by more than one consumer, because deleting both consumers via XGROUP DELCONSUMER leads to a double free. NOTE: this issue exists because of an incomplete fix for CVE-2026-25243.
CVE-2026-23631CVSS 8.1Redis is an in-memory data structure store. In all versions of redis-server with Lua scripting, an authenticated attacker can exploit the master-replica synchronization mechanism to trigger a use-after-free on replicas where replica-read-only is disabled or can be disabled, which may lead to remote code execution. A workaround is to prevent users from executing Lua scripts or avoid using replicas where replica-read-only is disabled. This is patched in version 8.6.3.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2018-12326. Free for 1 server.

Get started free