Impact
A protocol state desynchronization issue has been reported in the Lettuce Java Redis client. Under certain error conditions—specifically when a fatal java.lang.Error (such as OutOfMemoryError) occurs during command processing—the Lettuce event loop may continue operating in an inconsistent internal state. As a result, Redis responses may become misaligned with their originating requests, leading to deserialization failures (for example, UnsupportedOperationException: io.lettuce.core.output.ValueOutput does not support set(long)) and potentially leaking sensitive information from one application session to another.
This issue impacts applications using the Lettuce client (io.lettuce:lettuce-core) across synchronous, asynchronous, and reactive APIs, particularly those that rely on long-lived connections and do not fully reset client state after fatal JVM errors.
Patches
The issue was resolved and backported to the following versions:
https://github.com/redis/lettuce/releases/tag/6.8.2.RELEASE
https://github.com/redis/lettuce/releases/tag/7.0.1.RELEASE
https://github.com/redis/lettuce/releases/tag/7.1.1.RELEASE
https://github.com/redis/lettuce/releases/tag/7.2.1.RELEASE
Workarounds
We strongly recommend upgrading Lettuce client to the patched versions. In cases when upgrade is not possible, users may mitigate the impact through the following measures:
- Force connection termination on fatal errors: Ensure that any
java.lang.Error encountered in the application lifecycle triggers a full shutdown and recreation of the Lettuce RedisClient and its connections.
- Reduce likelihood of fatal JVM errors: Tune JVM memory settings, garbage collection, and workload characteristics to minimize the risk of
OutOfMemoryError and similar fatal conditions.
- Limit connection reuse in high-risk workloads: Avoid sharing a single long-lived connection across workloads where fatal errors are more likely to occur.
These mitigations do not eliminate the underlying issue but can reduce the risk of incorrect behavior following a fatal error.
Credits
Special thanks to the Rapid7 researchers for this discovering and reporting this vulnarability:
Ryan Williams, Distinguished Software Engineer, Rapid7
Allen Hadden, Senior Principal Engineer, Rapid7
Erez Breiman, Distinguished Software Engineer, Rapid7
References
#3132
https://github.com/nordnet/lettuce-out-of-order
Impact
A protocol state desynchronization issue has been reported in the Lettuce Java Redis client. Under certain error conditions—specifically when a fatal
java.lang.Error(such asOutOfMemoryError) occurs during command processing—the Lettuce event loop may continue operating in an inconsistent internal state. As a result, Redis responses may become misaligned with their originating requests, leading to deserialization failures (for example,UnsupportedOperationException: io.lettuce.core.output.ValueOutput does not support set(long)) and potentially leaking sensitive information from one application session to another.This issue impacts applications using the Lettuce client (
io.lettuce:lettuce-core) across synchronous, asynchronous, and reactive APIs, particularly those that rely on long-lived connections and do not fully reset client state after fatal JVM errors.Patches
The issue was resolved and backported to the following versions:
https://github.com/redis/lettuce/releases/tag/6.8.2.RELEASE
https://github.com/redis/lettuce/releases/tag/7.0.1.RELEASE
https://github.com/redis/lettuce/releases/tag/7.1.1.RELEASE
https://github.com/redis/lettuce/releases/tag/7.2.1.RELEASE
Workarounds
We strongly recommend upgrading Lettuce client to the patched versions. In cases when upgrade is not possible, users may mitigate the impact through the following measures:
java.lang.Errorencountered in the application lifecycle triggers a full shutdown and recreation of the LettuceRedisClientand its connections.OutOfMemoryErrorand similar fatal conditions.These mitigations do not eliminate the underlying issue but can reduce the risk of incorrect behavior following a fatal error.
Credits
Special thanks to the Rapid7 researchers for this discovering and reporting this vulnarability:
Ryan Williams, Distinguished Software Engineer, Rapid7
Allen Hadden, Senior Principal Engineer, Rapid7
Erez Breiman, Distinguished Software Engineer, Rapid7
References
#3132
https://github.com/nordnet/lettuce-out-of-order