Netty
Netty: Resource exhaustion in MqttDecoder
Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, the MQTT 5 header Properties section is parsed and buffered before any message size limit is applied. Specifically, in MqttDecoder, the decodeVariableHeader() method is called before the bytesRemainingBeforeVariableHeader > maxBytesInMessage check. The decodeVariableHeader() can call other methods which will call decodeProperties(). Effectively, Netty does not apply any limits to the size of the properties being decoded. Additionally, because MqttDecoder extends ReplayingDecoder, Netty will repeatedly re-parse the enormous Properties sections and buffer the bytes in memory, until the entire thing parses to completion. This can cause high resource usage in both CPU and memory. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.2.0.Alpha1, < 4.2.13.Final
- < 4.1.133.Final
Fixed in 4.2.13.Final, 4.1.133.Final
- >= 4.2.0.Alpha1, < 4.2.13.Final
- < 4.1.133.Final
Fixed in 4.2.13.Final, 4.1.133.Final
Mitigation
Upgrade netty to 4.2.13.Final or 4.1.133.Final or later.
Upgrade netty-codec-mqtt to 4.2.13.Final or 4.1.133.Final or later.
References
- Vendor advisory github.com/netty/netty/security/advisories/GHS…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.