Remote Command Injection and DoS in Predis via CRLF Smuggling
Predis versions 3.0.0-RC1 through 3.2.0 are vulnerable to CRLF smuggling in pipeline operations on aggregate connections, enabling remote command injection on cluster configurations or denial-of-service on replication setups.
CVE search metadata
CVE search record: CVE-2026-84372. Severity: critical. CVSS: 9.8. EPSS: 0.41%. KEV: no. Product: Predis (3.0.0-RC1 to 3.2.0). Brief: Remote Command Injection and DoS in Predis via CRLF Smuggling. Brief link: https://feed.craftedsignal.io/briefs/2026-09-predis-crlf-smuggling/
Predis versions 3.0.0-RC1 through 3.2.0 contain an improper CRLF neutralization vulnerability in the AbstractAggregateConnection::write() method. When executing pipeline operations on aggregate connections (cluster or replication), the library re-parses the serialized pipeline buffer using explode("\r\n") instead of respecting RESP length prefixes. An attacker who can influence values or keys passed into pipelined commands can inject arbitrary Redis commands.
On cluster configurations, this results in remote command injection, allowing attackers to execute commands like FLUSHDB, DEL, or SET on specific shards, potentially leading to cache poisoning, data theft, or service outages. On replication configurations, the same CRLF injection causes the deserializeCommand() method to throw an uncaught UnexpectedValueException, resulting in a repeatable, unauthenticated denial-of-service condition. This vulnerability was introduced in v3.0.0-RC1 and fixed in version 3.3.0.
Attack Chain
- The application accepts user-influenced input, such as a URL slug, used as a key for Redis cache operations.
- The application initiates a
pipeline()request containing the attacker-influenced key to a Redis cluster. - The attacker crafts a request containing a smuggled command payload, such as
PAD\r\n*1\r\n$7\r\nFLUSHDB. - The Predis library's vulnerable
AbstractAggregateConnectionlogic splits the buffer based on\r\ncharacters, improperly identifying the smuggled payload as a new command. - The library rebuilds the smuggled command and routes it to a specific Redis node based on the hardcoded
'key'slot strategy. - The Redis cluster node parses the smuggled command (e.g.,
FLUSHDB) as a legitimate request from the application. - The target Redis shard executes the smuggled command, resulting in cache clearing, data modification, or unauthorized access.
Impact
Successful exploitation allows for unauthenticated remote command injection in cluster environments, leading to shard-wide data destruction via FLUSHDB, targeted DEL operations, or cache poisoning. In replication environments, the vulnerability acts as a reliable vector for denial-of-service, crashing request-handling threads and impacting application availability. This affects any application utilizing Predis v3.0.0-RC1 through 3.2.0 with aggregate connection types.
Recommendation
- Immediately upgrade to predis/predis 3.3.0 or later to resolve the CRLF neutralization flaw in the pipeline handler.
- If upgrading is not immediately possible, audit application code to ensure that no attacker-influenced data (values or keys) is used within
pipeline()calls on aggregate connections. - Deploy WAF or application-level input validation to sanitize input keys and values for
\r\nsequences before they are processed by the Predis client library. - Monitor application logs for
UnexpectedValueExceptionerrors in production environments, which may indicate attempted exploitation or active DoS attacks against replication-based setups.
Immediate actions
Upgrade Predis dependency to 3.3.0 or later across all applications.
Mitigations
Implement strict validation for CRLF characters in inputs used for cache keys.
CVE-2026-84372