Predis
Predis: Redis command injection and denial of service via CRLF smuggling in pipelined commands on aggregate connections
Predis is a flexible and feature-complete Redis and Valkey client for PHP. From version 3.0.0-RC1 until version 3.3.0, pipeline handling on aggregate cluster and replication connections reparses an already serialized RESP buffer in AbstractAggregateConnection::write() by splitting it with explode("\r\n") instead of honoring RESP length prefixes. Attacker-controlled keys or values containing CRLF sequences can therefore be interpreted by Command::deserializeCommand() as additional commands. On cluster connections, ClusterStrategy::getFakeKey() can route injected keyless commands using the literal fake key value "key", permitting operations such as shard-wide cache deletion, targeted data modification, data reads, or node disruption. On replication connections, malformed reparsing can throw an uncaught exception and repeatedly terminate affected requests. Only pipeline() reaches this vulnerable path; transaction() and MULTI are not affected. This issue is fixed in version 3.3.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 3.0.0-RC1, < 3.3.0
Fixed in 3.3.0
Mitigation
Upgrade predis to 3.3.0 or later.
References
- Vendor advisory github.com/predis/predis/security/advisories/G…
- Patch github.com/predis/predis/pull/1586
- Patch github.com/predis/predis/commit/053cb4b6ac7fb1…
1 more
- Release notes github.com/predis/predis/releases/tag/v3.3.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.