CVE-2022-2191: Jetty SslConnection does not release pooled ByteBuffers in case of errors

Summary

07/07/2022
Yes i
High
7.5

CVE-2022-2191: Jetty SslConnection does not release pooled ByteBuffers in case of errors. Affects org.eclipse.jetty:jetty-server across 2 version ranges.

>= 10.0.0, < 10.0.10 >= 11.0.0, < 11.0.10

Fixed in 10.0.10 or 11.0.10, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The org.eclipse.jetty:jetty-server package is an open-source Java HTTP server and servlet container. It provides a powerful and flexible server framework for building web applications. The package is widely used in various Java-based web applications and frameworks. However, a vulnerability has been discovered in the package that affects versions 10.0.0 to 10.0.10 and 11.0.0 to 11.0.10.

Vulnerability Detail

The vulnerability in the org.eclipse.jetty:jetty-server package lies in the SslConnection class, which fails to release ByteBuffers in case of error code paths. This can lead to memory leaks when TLS handshakes encounter errors, such as when clients with expired certificates attempt client-authentication. The leaked ByteBuffers can accumulate and consume excessive memory resources. The impact of this vulnerability can result in increased memory usage and potential denial-of-service conditions.

How To Fix

Latest published version: 12.1.14 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 10.0.0, < 10.0.10 10.0.10
  • >= 11.0.0, < 11.0.10 11.0.10

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a workaround can be implemented by configuring a RetainableByteBufferPool with specific memory limits. This will help limit the amount of memory that can be leaked. Here is an example of how to configure the pool with embedded Jetty:

int maxBucketSize = 1000;
long maxHeapMemory = 128 * 1024L * 1024L; // 128 MB
long maxDirectMemory = 128 * 1024L * 1024L; // 128 MB
RetainableByteBufferPool rbbp = new ArrayRetainableByteBufferPool(0, -1, -1, maxBucketSize, maxHeapMemory, maxDirectMemory);

server.addBean(rbbp); // make sure the ArrayRetainableByteBufferPool is added before the server is started
server.start();

For Jetty with jetty-home/jetty-base, a configuration file retainable-byte-buffer-config.xml needs to be created in the ${jetty.base}/etc/ directory. The file should contain the following XML configuration:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addBean">
    <Arg>
      <New class="org.eclipse.jetty.io.ArrayRetainableByteBufferPool">
        <Arg type="int"><Property name="jetty.byteBufferPool.minCapacity" default="0"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.factor" default="-1"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.maxCapacity" default="-1"/></Arg>
        <Arg type="int"><Property name="jetty.byteBufferPool.maxBucketSize" default="1000"/></Arg>
        <Arg type="long"><Property name="jetty.byteBufferPool.maxHeapMemory" default="128000000"/></Arg>
        <Arg type="long"><Property name="jetty.byteBufferPool.maxDirectMemory" default="128000000"/></Arg>
      </New>
    </Arg>
  </Call>
</Configure>

This configuration file should be referenced in the ${jetty.base}/start.d/retainable-byte-buffer-config.ini file:

etc/retainable-byte-buffer-config.xml

These workarounds will help mitigate the memory leak issue until the package can be updated.

Conclusion

The org.eclipse.jetty:jetty-server package is vulnerable to a memory leak issue in the SslConnection class. Upgrading to the latest version of the package (10.0.11 or 11.0.11 or later) is the recommended solution. If immediate upgrade is not possible, implementing the provided workaround can help mitigate the vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.eclipse.jetty:jetty-server →

Share this vulnerability

FAQ

The impact of this vulnerability can result in increased memory usage and potential denial-of-service conditions. Memory leaks can occur when TLS handshakes encounter errors, leading to excessive memory consumption.

Versions 10.0.0 to 10.0.10 and 11.0.0 to 11.0.10 of the org.eclipse.jetty:jetty-server package are affected by this vulnerability.

To fix this vulnerability, it is recommended to upgrade to the latest version of the org.eclipse.jetty:jetty-server package (10.0.11 or 11.0.11 or later). This will ensure that the memory leaks are properly addressed.

Yes, if upgrading to the latest version is not immediately feasible, you can implement a workaround by configuring a RetainableByteBufferPool with specific memory limits. This will help limit the amount of memory that can be leaked.

You can find more information about this vulnerability in the official GitHub issue: https://github.com/eclipse/jetty.project/issues/8161

Related vulnerabilities

Recent vulnerabilities recorded for org.eclipse.jetty:jetty-server.

How To Fix

Latest published version: 12.1.14 as of 23 Oct 2026

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 10.0.0, < 10.0.10 10.0.10
  • >= 11.0.0, < 11.0.10 11.0.10

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback