Skip to content

**UNSUPPORTED WHEN ASSIGNED** GzipHandler causes part of request body to be seen as request body of a separate request

High
joakime published GHSA-q4rv-gq96-w7c5 May 8, 2025

Package

org.eclipse.jetty.server:jetty-server (Jetty)

Affected versions

>=9.4.0,<=9.4.56

Patched versions

9.4.57 (EOL)

Description

Impact

The original report:

A year ago we added Jetty’s GzipHandler to decompress requests with a certain URL path. We hit CVE-2020-27218 (GHSA-86wm-rrjm-8wh8) and upgrading to Jetty 9.4.53 fixed the issue. Over the past few months we upgraded Jetty several times and we are currently on 9.4.56.

Recently we received reports from a customer where they saw unexpected results from their API requests. Upon investigation we narrowed down the problem in the Jetty layer and the issue looks very similar to CVE-2020-27218 but slightly different.

The symptom: A portion of the request body from request A overwrites a portion of the request body from request B. The resulting content of request A seems to be intact with no modifications. The resulting content of request B is a mix of original content A and original content B. There is no exception from neither request A nor request B, and both requests are consumed fully. Both requests have an uncompressed request body.

To understand when this issue started, we looked at occurrences of this data leakage and the first occurrence of it was when we upgraded to Jetty 9.4.53 to fix CVE-2020-27218.

To fix the new issue, we implemented our own GzipHandler that extends from Jetty’s GzipHandler and found that if we bypass Jetty’s handler for such requests then the issue no longer occurs. We suspect that this portion (https://github.com/jetty/jetty.project/blob/jetty-9.4.x/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java#L630-L717) of the GzipHandler code unintentionally affects uncompressed requests in high volume environments.

Here is some additional information on the different types of requests handled by Jetty in our environment.

/path1: This path is set in the includedPaths for the GzipHandler. These are gzip’ed requests.
/path2: This path is not set in the includedPaths. Requests to this path can be either uncompressed or compressed. If compressed, servlet handles it based on the content encoding.

We have observed the issue only in uncompressed requests to /path2. (Both requests A and B described in the symptom are uncompressed.) The custom GzipHandler we implemented checks if the request is to /path2 and calls _handler.handle, essentially bypassing Jetty’s GzipHandler for all requests going to this path. For requests to /path1, it calls super.handle and defers to Jetty’s GzipHandler.

How to reproduce?

We have yet to find a way to reproduce. So far this issue is only observed in our production environment with a very high volume of requests.

Workarounds

The issue can be avoid by disabling (or not enabling) gzip inflation of request body content.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

CVE ID

CVE-2024-13009

Weaknesses

Credits