HIGH 7.5

CVE-2021-37137

SnappyFrameDecoder doesn't restrict chunk length any may buffer skippable chunks in an unnecessary way

Description

Impact

The Snappy frame decoder function doesn't restrict the chunk length which may lead to excessive memory usage. Beside this it also may buffer reserved skippable chunks until the whole chunk was received which may lead to excessive memory usage as well.

This vulnerability can be triggered by supplying malicious input that decompresses to a very big size (via a network stream or a file) or by sending a huge skippable chunk.

Impact

All users of SnappyFrameDecoder are affected and so the application may be in risk for a DoS attach due excessive memory usage.

References

https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/SnappyFrameDecoder.java#L79 https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/SnappyFrameDecoder.java#L171 https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/SnappyFrameDecoder.java#L185

Affected Maven artifacts (3)

ArtifactAffected versionsFixed in
io.netty » netty
*
-
io.netty » netty-codec
>= 4.0.0, < 4.1.68.Final
4.1.68.Final
org.jboss.netty » netty
*
-

Blast radius

3affected artifacts
337affected versions
53,486dependent artifacts (est.)
3,382,344dependent versions

73% of the dependent artifacts (39,521) still pull an affected version in their latest release.

DepthDependent versions
Direct
95,499
2 hops
461,125
3 hops
1,093,206
4 hops
898,340
5 hops
529,646
6 hops
304,528

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References