High, CVSS 7.5MavenPublished
HTTP/2 HPACK integer overflow and buffer allocation
CVE-2023-36478 · GHSA-wgh7-54f2-x98r
- Affected
- Maven org.eclipse.jetty.http2:http2-hpack >= 10.0.0, <= 10.0.15; >= 11.0.0, <= 11.0.15; >= 9.3.0, <= 9.4.52
- Fixed in
- 10.0.169.4.5311.0.16· Vendor fix available
- Issue
- An integer overflow in MetaDataBuilder.checkSize allows for HTTP/2 HPACK header values to exceed their size limit. In MetaDataBuilder.java, the following code determines if a header name or value exceeds the size limit, and throws an exception if the limit is exceeded: However, when length is very large and huffman is true, the multiplication by 4 in line 295 will overflow, and length will become negative. (size+length) will now be negative, and the check on line 296 will not be triggered. Furthermore, MetaDataBuilder.checkSize allows for user-entered HPACK header value sizes to be negative, potentially leading to a very large buffer allocation later on when the user-entered size is multiplied by 2. In MetaDataBuilder.java, the following code determines if a header name or value exceeds the size limit, and throws an exception if the limit is exceeded: However, no exception is thrown in the case of a negative size. Later, in Huffman.decode, the user-entered length is multiplied by 2…
Recommended action: Upgrade to 11.0.16, 10.0.16 or 9.4.53 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.