Http4k
http4k: Unbounded gzip decompression in `ServerFilters.GZip` / `RequestFilters.GunZip` allowed memory-exhaustion DoS
http4k is a functional toolkit for Kotlin HTTP applications. Prior to 4.51.0.0, 5.42.0.0, and 6.49.0.0, ServerFilters.GZip, RequestFilters.GunZip, and the underlying Gzip request-body decompression functions impose no limit on decompressed size. An unauthenticated client can send a small gzip-encoded request body that expands to gigabytes, exhausting the JVM heap and denying service to other clients. The fix uses SizeLimitedInputStream to enforce a default 10 MiB limit, causes ServerFilters.GZip and RequestFilters.GunZip to return 413 Request Entity Too Large, and causes other decompression paths to throw SizeLimitExceededException. This issue is fixed in versions 4.51.0.0, 5.42.0.0, and 6.49.0.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 4.51.0.0
- >= 5.0.0.0, < 5.42.0.0
- >= 6.0.0.0, < 6.49.0.0
Fixed in 4.51.0.0, 5.42.0.0, 6.49.0.0
Mitigation
Upgrade http4k to 4.51.0.0 or 5.42.0.0 or 6.49.0.0 or later.
References
- Vendor advisory github.com/http4k/http4k/security/advisories/G…
- Patch github.com/http4k/http4k/commit/2618fe08f98013…
- Patch github.com/http4k/http4k/commit/9f9e02f8efbbe0…
1 more
- Release notes github.com/http4k/http4k/releases/tag/6.49.0.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.