Skip to content

GHSA-m394-8rww-3jr7 BIT-nifi-2020-27223 BIT-solr-2020-27223 BIT-spark-2020-27223 CVE-2020-27223

DOS vulnerability for Quoted Quality CSV headers

Medium Maven
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
78.03%
Chance of exploitation in the next 30 days. Higher than 99.58% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-400 Uncontrolled Resource Consumption
Fix
9.4.37
Upgrade org.eclipse.jetty:jetty-server to this version or later

Description

Impact

When Jetty handles a request containing request headers with a large number of “quality” (i.e. q) parameters (such as what are seen on the Accept, Accept-Encoding, and Accept-Language request headers), the server may enter a denial of service (DoS) state due to high CPU usage while sorting the list of values based on their quality values. A single request can easily consume minutes of CPU time before it is even dispatched to the application.

The only features within Jetty that can trigger this behavior are:

  • Default Error Handling - the Accept request header with the QuotedQualityCSV is used to determine what kind of content to send back to the client (html, text, json, xml, etc)
  • StatisticsServlet - uses the Accept request header with the QuotedQualityCSV to determine what kind of content to send back to the client (xml, json, text, html, etc)
  • HttpServletRequest.getLocale() - uses the Accept-Language request header with the QuotedQualityCSV to determine which “preferred” language is returned on this call.
  • HttpservletRequest.getLocales() - is similar to the above, but returns an ordered list of locales based on the quality values on the Accept-Language request header.
  • DefaultServlet - uses the Accept-Encoding request header with the QuotedQualityCSV to determine which kind of pre-compressed content should be sent back for static content (content that is not matched against a url-pattern in your web app)

Versions

QuotedQualityCSV was introduced to Jetty 9.3.9.v20160517 and the bug that introduced the vulnerability was in 9.4.6.v20170531.

Currently, known vulnerable versions include:

  • 9.4.6.v20170531 thru to 9.4.36.v20210114
  • 10.0.0
  • 11.0.0

Workarounds

Quality ordered values are used infrequently by jetty so they can be avoided by:

  • Do not use the default error page/handler.
  • Do not deploy the StatisticsServlet exposed to the network
  • Do not call getLocale API
  • Do not enable precompressed static content in the DefaultServlet

Patches

All patches are available for download from the Eclipse Jetty website at https://www.eclipse.org/jetty/download.php

  • 9.4.37.v20210219 and greater
  • 10.0.1 and greater
  • 11.0.1 and greater

Affected versions

Maven

PackageVulnerableFixed in
org.eclipse.jetty:jetty-server
>= 9.4.6, < 9.4.37
9.4.37
org.eclipse.jetty:jetty-server
>= 10.0.0, < 10.0.1
10.0.1
org.eclipse.jetty:jetty-server
>= 11.0.0, < 11.0.1
11.0.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.eclipse.jetty:jetty-server Maven → 9.4.37

maven
<dependency><groupId>org.eclipse.jetty</groupId><artifactId>jetty-server</artifactId><version>9.4.37</version></dependency>
gradle
implementation("org.eclipse.jetty:jetty-server:9.4.37")

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

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

Weakness

CWE-400: Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource.

How to prevent it
  • Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
  • Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
  • Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
  • Implementation: Ensure that all failures in resource allocation place the system into a safe posture.

References

Advisories

Packages

Other links

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-7p3p-8qv8-m2vh
Eclipse Jetty: HTTP Authority/Host mismatch
Medium Also affects org.eclipse.jetty:jetty-server
GHSA-f4v5-65jj-pcr2
Eclipse Jetty: Cross-Request Leakage for trailers on HTTP/1.1 keep-alive connections
High Also affects org.eclipse.jetty:jetty-server
GHSA-9299-c6m4-mjhc
Eclipse Jetty: DoS attack triggering OutOfMemory with 100-Continue requests
High Also affects org.eclipse.jetty:jetty-server
GHSA-xxh7-fcf3-rj7f
The Eclipse Jetty Server Artifact has a Gzip request memory leak
High Also affects org.eclipse.jetty:jetty-server
GHSA-q4rv-gq96-w7c5
**UNSUPPORTED WHEN ASSIGNED** GzipHandler causes part of request body to be seen as request body of a separate request
High Also affects org.eclipse.jetty:jetty-server
GHSA-g8m5-722r-8whq
Eclipse Jetty's ThreadLimitHandler.getRemote() vulnerable to remote DoS attacks
Medium Also affects org.eclipse.jetty:jetty-server
GHSA-p26g-97m4-6q7c
Eclipse Jetty's cookie parsing of quoted values can exfiltrate values from other cookies
Medium Also affects org.eclipse.jetty:jetty-server
GHSA-qw69-rqj8-6qw8
OutOfMemoryError for large multipart without filename in Eclipse Jetty
Medium Also affects org.eclipse.jetty:jetty-server
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor