Jetty HTTP/2 HPACK Overflow 9-11 Fixed 9.4.53/10.0.16/11.0.16
CVE-2023-36478 Published on October 10, 2023
HTTP/2 HPACK integer overflow and buffer allocation
Eclipse Jetty provides a web server and servlet container. In versions 11.0.0 through 11.0.15, 10.0.0 through 10.0.15, and 9.0.0 through 9.4.52, an integer overflow in `MetaDataBuilder.checkSize` allows for HTTP/2 HPACK header values to
exceed their size limit. `MetaDataBuilder.java` 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. This means that if a user provides a negative length value (or, more precisely, a length value which, when multiplied by the 4/3 fudge factor, is negative), and this length value is a very large positive number when multiplied by 2, then the user can cause a very large buffer to be allocated on the server. Users of HTTP/2 can be impacted by a remote denial of service attack. The issue has been fixed in versions 11.0.16, 10.0.16, and 9.4.53. There are no known workarounds.
Vulnerability Analysis
CVE-2023-36478 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity, and a high impact on availability.
Weakness Types
Integer Overflow or Wraparound
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
What is a Resource Exhaustion Vulnerability?
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
CVE-2023-36478 has been classified to as a Resource Exhaustion vulnerability or weakness.
Products Associated with CVE-2023-36478
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2023-36478 are published in these products:
Affected Versions
eclipse jetty.project:- Version >= 10.0.0, < 10.0.16 is affected.
- Version >= 11.0.0, < 11.0.16 is affected.
- Version >= 9.3.0, < 9.4.53 is affected.
Vulnerable Packages
The following package name and versions may be associated with CVE-2023-36478
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| maven | org.eclipse.jetty.http2:http2-hpack | >= 9.3.0, <= 9.4.52 | 9.4.53 |
| maven | org.eclipse.jetty.http3:http3-qpack | >= 11.0.0, <= 11.0.15 | 11.0.16 |
| maven | org.eclipse.jetty.http3:http3-qpack | >= 10.0.0, <= 10.0.15 | 10.0.16 |
| maven | org.eclipse.jetty.http2:http2-hpack | >= 11.0.0, <= 11.0.15 | 11.0.16 |
| maven | org.eclipse.jetty.http2:http2-hpack | >= 10.0.0, <= 10.0.15 | 10.0.16 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.