CVE-2019-17638: Jetty server Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-x3rh-m7vp-35f2
CVSS 9.4
CWE-672 CWE-675
Published
Advisory Summary

CVE-2019-17638 is a CRITICAL (CVSS 9.4) remote code execution vulnerability (CWE-672: Operation on a Resource after Expiration or Release) affecting Jetty server libraries in the Maven ecosystem. The issue involves operation on a resource after expiration or release in jetty server. Remediation is available by upgrading affected packages to version 9.4.30.v20200611.

CVE-2019-17638 at a Glance

CVE Identifier CVE-2019-17638
GHSA Identifier GHSA-x3rh-m7vp-35f2
Severity CRITICAL
CVSS v3.1 Base Score 9.4
CWE Classification CWE-672: Operation on a Resource after Expiration or Release
Affected Product Jetty server
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2019-17638

To remediate this vulnerability, upgrade all affected Jetty server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.eclipse.jetty:jetty-server fixed: 9.4.30.v20200611
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-server</artifactId>
    <version>9.4.30.v20200611</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.eclipse.jetty

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2019-17638, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.eclipse.jetty

Analyze the terminal output to locate any version of Jetty server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.4.30.v20200611), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.eclipse.jetty command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-672: Operation on a Resource after Expiration or Release, where the product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked. In Jetty server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In Eclipse Jetty, versions 9.4.27.v20200227 to 9.4.29.v20200521, in case of too large response headers, Jetty throws an exception to produce an HTTP 431 error. When this happens, the ByteBuffer containing the HTTP response headers is released back to the ByteBufferPool twice. Because of this double release, two threads can acquire the same ByteBuffer from the pool and while thread1 is about to use the ByteBuffer to write response1 data, thread2 fills the ByteBuffer with response2 data. Thread1 then proceeds to write the buffer that now contains response2 data. This results in client1, which issued request1 and expects responses, to see response2 which could contain sensitive data belonging to client2 (HTTP session ids, authentication credentials, etc.).

CVE-2019-17638 Affected Jetty server Versions

1 component(s)
Fixed Versions:
9.4.30.v20200611
Product / Package Ecosystem Affected Versions Fixed Version
org.eclipse.jetty:jetty-server
Maven
≥ 9.4.27
< 9.4.30.v20200611
9.4.30.v20200611

References

NVD — CVE-2019-17638 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-17638
Jetty server Source Repository REPOSITORY
https://github.com/eclipse/jetty.project/issues/4936
Security Fix Commit FIX COMMIT
https://github.com/eclipse/jetty.project/commit/ff8ae56fa939c3477a0cdd1ff56ce3d902f08fba
Jetty server Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html
Jetty server Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
snyk.io/vuln/snyk-java-orge... WEB
https://snyk.io/vuln/SNYK-JAVA-ORGECLIPSEJETTY-575561
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XE6US6VPZHOWFMUSFGDS5V2DNQPY5MKB
lists.apache.org/thread.html/rd98cfd... WEB
https://lists.apache.org/thread.html/rd98cfd012490cb02caa1a11aaa0cc38bff2d43bcce9b20c2f01063dd@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/rd0e44e... WEB
https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/rbe1f23... WEB
https://lists.apache.org/thread.html/rbe1f230e87ea947593145d0072d0097ddb0af10fee1161db8ca1546c@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/ra8661f... WEB
https://lists.apache.org/thread.html/ra8661fc8c69c647cb06153c1485d48484a833d873f75dfe45937e9de@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r9a2cfa... WEB
https://lists.apache.org/thread.html/r9a2cfa56d30782a0c17a5deb951a622d1f5c8de48e1c3b578ffc2a84@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r9584c4... WEB
https://lists.apache.org/thread.html/r9584c4304c888f651d214341a939bd264ed30c9e3d0d30fe85097ecf@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r81f585... WEB
https://lists.apache.org/thread.html/r81f58591fb4716fb867b36956f30c7c8ad4ab3f23abc952d9d86a2a0@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r7fc5f2... WEB
https://lists.apache.org/thread.html/r7fc5f2ed49641ea91c433e3cd0fc3d31c0278c87b82b15c33b881415@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r521168... WEB
https://lists.apache.org/thread.html/r521168299e023fb075b57afe33d17ff1d09e8a10e0fd8c775ea0e028@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r4bdd3f... WEB
https://lists.apache.org/thread.html/r4bdd3f7bb6820a79f9416b6667d718a06d269018619a75ce4b759318@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r378e4c... WEB
https://lists.apache.org/thread.html/r378e4cdec15e132575aa1dcb6296ffeff2a896745a8991522e266ad4@%3Ccommits.pulsar.apache.org%3E
lists.apache.org/thread.html/r290739... WEB
https://lists.apache.org/thread.html/r29073905dc9139d0d7a146595694bf57bb9e35e5ec6aa73eb9c8443a@%3Ccommits.pulsar.apache.org%3E
bugs.eclipse.org/bugs/show_bug.cgi WEB
https://bugs.eclipse.org/bugs/show_bug.cgi?id=564984
Jetty server Security Information SECURITY
http://www.openwall.com/lists/oss-security/2020/08/17/1

Frequently Asked Questions

What is CVE-2019-17638?
CVE-2019-17638 is a security vulnerability in Jetty server involving Operation on a Resource after Expiration or Release in Jetty Server under CWE-672: Operation on a Resource after Expiration or Release.
Which Jetty server versions are affected?
Affected versions include releases prior to 9.4.30.v20200611 across affected packages: org.eclipse.jetty:jetty-server.
What version fixes CVE-2019-17638?
Upgrading to 9.4.30.v20200611 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jetty-server affected?
Yes, org.eclipse.jetty:jetty-server is affected in releases prior to 9.4.30.v20200611. Upgrade your dependency to 9.4.30.v20200611 or later.
What is the CVSS score of CVE-2019-17638?
CVE-2019-17638 has a CVSS v3.1 base score of 9.4 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2019-17638?
CVE-2019-17638 is classified under CWE-672: Operation on a Resource after Expiration or Release (The product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked.).
How can I check Maven dependencies for CVE-2019-17638?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.eclipse.jetty'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x3rh-m7vp-35f2",
  "modified" : "2021-06-15T18:11:20Z",
  "published" : "2020-08-05T14:52:59Z",
  "aliases" : [ "CVE-2019-17638" ],
  "summary" : "Operation on a Resource after Expiration or Release in Jetty Server",
  "details" : "In Eclipse Jetty, versions 9.4.27.v20200227 to 9.4.29.v20200521, in case of too large response headers, Jetty throws an exception to produce an HTTP 431 error. When this happens, the ByteBuffer containing the HTTP response headers is released back to the ByteBufferPool twice. Because of this double release, two threads can acquire the same ByteBuffer from the pool and while thread1 is about to use the ByteBuffer to write response1 data, thread2 fills the ByteBuffer with response2 data. Thread1 then proceeds to write the buffer that now contains response2 data. This results in client1, which issued request1 and expects responses, to see response2 which could contain sensitive data belonging to client2 (HTTP session ids, authentication credentials, etc.).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.jetty:jetty-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.4.27"
      }, {
        "fixed" : "9.4.30.v20200611"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 9.4.30.v20200610"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-17638"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/issues/4936"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse/jetty.project/commit/ff8ae56fa939c3477a0cdd1ff56ce3d902f08fba"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-ORGECLIPSEJETTY-575561"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XE6US6VPZHOWFMUSFGDS5V2DNQPY5MKB"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd98cfd012490cb02caa1a11aaa0cc38bff2d43bcce9b20c2f01063dd@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rbe1f230e87ea947593145d0072d0097ddb0af10fee1161db8ca1546c@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/ra8661fc8c69c647cb06153c1485d48484a833d873f75dfe45937e9de@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9a2cfa56d30782a0c17a5deb951a622d1f5c8de48e1c3b578ffc2a84@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r9584c4304c888f651d214341a939bd264ed30c9e3d0d30fe85097ecf@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r81f58591fb4716fb867b36956f30c7c8ad4ab3f23abc952d9d86a2a0@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r7fc5f2ed49641ea91c433e3cd0fc3d31c0278c87b82b15c33b881415@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r521168299e023fb075b57afe33d17ff1d09e8a10e0fd8c775ea0e028@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r4bdd3f7bb6820a79f9416b6667d718a06d269018619a75ce4b759318@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r378e4cdec15e132575aa1dcb6296ffeff2a896745a8991522e266ad4@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r29073905dc9139d0d7a146595694bf57bb9e35e5ec6aa73eb9c8443a@%3Ccommits.pulsar.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.eclipse.org/bugs/show_bug.cgi?id=564984"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2020/08/17/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-672", "CWE-675" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-03T20:11:29Z",
    "nvd_published_at" : "2020-07-09T18:15:00Z"
  }
}