Compare commits

...

2 Commits

Author SHA1 Message Date
Vladyslav Vildanov 3a5b55e46e Deprecated CommandInterface::deserializeCommand() (CVE GHSA-w6f5-v2h6-g786) (#1724) 2026-09-11 07:56:58 -07:00
Till Krüss 401abc4315 fix changelog typo 2026-09-10 15:31:07 -07:00
4 changed files with 17 additions and 1 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
## Changelog ## Changelog
## Unlreleads ## Unreleased
### Added ### Added
### Changed ### Changed
- Deprecated `CommandInterface::deserializeCommand()` (CVE GHSA-w6f5-v2h6-g786)
### Fixed ### Fixed
- Fixed RESP3 double parsing returning positive `INF` for `-inf` payloads (#1716) - Fixed RESP3 double parsing returning positive `INF` for `-inf` payloads (#1716)
- Fixed `client_info` connection parameter being ignored (#1722) - Fixed `client_info` connection parameter being ignored (#1722)
+3
View File
@@ -158,6 +158,9 @@ abstract class Command implements CommandInterface
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @deprecated Not binary-safe; see CommandInterface::deserializeCommand().
* Scheduled for removal in the next major.
*/ */
public static function deserializeCommand(string $serializedCommand): CommandInterface public static function deserializeCommand(string $serializedCommand): CommandInterface
{ {
+6
View File
@@ -98,6 +98,12 @@ interface CommandInterface
* *
* @param string $serializedCommand * @param string $serializedCommand
* @return static * @return static
*
* @deprecated Not binary-safe: it re-parses on "\r\n" and ignores RESP bulk-length
* prefixes, so any argument containing "\r\n" is corrupted, and it
* instantiates a command class from the parsed input. Never call it on
* untrusted or serialized data (see CVE GHSA-w6f5-v2h6-g786). Scheduled
* for removal in the next major.
*/ */
public static function deserializeCommand(string $serializedCommand): CommandInterface; public static function deserializeCommand(string $serializedCommand): CommandInterface;
} }
+6
View File
@@ -153,6 +153,12 @@ final class RawCommand implements CommandInterface
return $buffer; return $buffer;
} }
/**
* {@inheritDoc}
*
* @deprecated Not binary-safe; see CommandInterface::deserializeCommand().
* Scheduled for removal in the next major.
*/
public static function deserializeCommand(string $serializedCommand): CommandInterface public static function deserializeCommand(string $serializedCommand): CommandInterface
{ {
if ($serializedCommand[0] !== '*') { if ($serializedCommand[0] !== '*') {