CVE-2022-2191: Jetty server Jetty SslConnection Does Not Release Vulnerability
HIGHCVE-2022-2191 is a HIGH (CVSS 7.5) jetty sslconnection does not release vulnerability (CWE-404: Improper Resource Shutdown or Release) affecting Jetty server libraries in the Maven ecosystem. The issue involves jetty sslconnection does not release pooled bytebuffers in case of errors. Remediation is available by upgrading affected packages to version 10.0.10, 11.0.10.
CVE-2022-2191 at a Glance
Security Impact
CVSS: 7.5
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:N/I:N/A:H).
How to Fix CVE-2022-2191
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.
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>10.0.10</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>11.0.10</version>
</dependency>
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-2022-2191, 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 10.0.10), 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-404: Improper Resource Shutdown or Release, where the product does not release or incorrectly releases a resource before it is made available for re-use. 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
CVE-2022-2191 Affected Jetty server Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.eclipse.jetty:jetty-server
|
Maven |
≥ 10.0.0
< 10.0.10
|
10.0.10
|
|
org.eclipse.jetty:jetty-server
|
Maven |
≥ 11.0.0
< 11.0.10
|
11.0.10
|
References
Frequently Asked Questions
What is CVE-2022-2191?
Which Jetty server versions are affected?
What version fixes CVE-2022-2191?
Is jetty-server affected?
What is the CVSS score of CVE-2022-2191?
What CWE is associated with CVE-2022-2191?
How can I check Maven dependencies for CVE-2022-2191?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8mpp-f3f7-xc28",
"modified" : "2022-08-11T21:31:50Z",
"published" : "2022-07-07T20:55:37Z",
"aliases" : [ "CVE-2022-2191" ],
"summary" : "Jetty SslConnection does not release pooled ByteBuffers in case of errors",
"details" : "### Impact\n`SslConnection` does not release `ByteBuffer`s in case of error code paths.\nFor example, TLS handshakes that require client-auth with clients that send expired certificates will trigger a TLS handshake errors and the `ByteBuffer`s used to process the TLS handshake will be leaked.\n\n### Workarounds\nConfigure explicitly a `RetainableByteBufferPool` with `max[Heap|Direct]Memory` to limit the amount of memory that is leaked.\nEventually the pool will be full of \"active\" entries (the leaked ones) and will provide `ByteBuffer`s that will be GCed normally.\n\n_With embedded-jetty_\n\n``` java\nint maxBucketSize = 1000;\nlong maxHeapMemory = 128 * 1024L * 1024L; // 128 MB\nlong maxDirectMemory = 128 * 1024L * 1024L; // 128 MB\nRetainableByteBufferPool rbbp = new ArrayRetainableByteBufferPool(0, -1, -1, maxBucketSize, maxHeapMemory, maxDirectMemory);\n\nserver.addBean(rbbp); // make sure the ArrayRetainableByteBufferPool is added before the server is started\nserver.start();\n```\n\n_With jetty-home/jetty-base_\n\nCreate a `${jetty.base}/etc/retainable-byte-buffer-config.xml`\n\n``` xml\n<?xml version=\"1.0\"?>\n<!DOCTYPE Configure PUBLIC \"-//Jetty//Configure//EN\" \"https://www.eclipse.org/jetty/configure_10_0.dtd\">\n\n<Configure id=\"Server\" class=\"org.eclipse.jetty.server.Server\">\n <Call name=\"addBean\">\n <Arg>\n <New class=\"org.eclipse.jetty.io.ArrayRetainableByteBufferPool\">\n <Arg type=\"int\"><Property name=\"jetty.byteBufferPool.minCapacity\" default=\"0\"/></Arg>\n <Arg type=\"int\"><Property name=\"jetty.byteBufferPool.factor\" default=\"-1\"/></Arg>\n <Arg type=\"int\"><Property name=\"jetty.byteBufferPool.maxCapacity\" default=\"-1\"/></Arg>\n <Arg type=\"int\"><Property name=\"jetty.byteBufferPool.maxBucketSize\" default=\"1000\"/></Arg>\n <Arg type=\"long\"><Property name=\"jetty.byteBufferPool.maxHeapMemory\" default=\"128000000\"/></Arg>\n <Arg type=\"long\"><Property name=\"jetty.byteBufferPool.maxDirectMemory\" default=\"128000000\"/></Arg>\n </New>\n </Arg>\n </Call>\n</Configure>\n```\n\nAnd then reference it in `${jetty.base}/start.d/retainable-byte-buffer-config.ini`\n\n```\netc/retainable-byte-buffer-config.xml\n```\n\n\n### References\nhttps://github.com/eclipse/jetty.project/issues/8161\n\n### For more information\n* Email us at [security@webtide.com](mailto:security@webtide.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.eclipse.jetty:jetty-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0"
}, {
"fixed" : "10.0.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.eclipse.jetty:jetty-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0"
}, {
"fixed" : "11.0.10"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/eclipse/jetty.project/security/advisories/GHSA-8mpp-f3f7-xc28"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-2191"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse/jetty.project/issues/8161"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse/jetty.project"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220909-0003"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-404" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-07T20:55:37Z",
"nvd_published_at" : "2022-07-07T21:15:00Z"
}
}