Jetty SslConnection does not release pooled ByteBuffers in case of errors
Published 7 Jul 2022 · Updated 8 Jul 2026
Is your project on an affected org.eclipse.jetty:jetty-server?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=10.0.0 <10.0.10
- Fixed in
- 10.0.10
mvn versions:use-dep-version -Dincludes=org.eclipse.jetty:jetty-server -DdepVersion=10.0.10 -DforceVersion=true- Affected
- >=11.0.0 <11.0.10
- Fixed in
- 11.0.10
mvn versions:use-dep-version -Dincludes=org.eclipse.jetty:jetty-server -DdepVersion=11.0.10 -DforceVersion=trueDetails
Impact
SslConnection does not release ByteBuffers in case of error code paths.
For example, TLS handshakes that require client-auth with clients that send expired certificates will trigger a TLS handshake errors and the ByteBuffers used to process the TLS handshake will be leaked.
Workarounds
Configure explicitly a RetainableByteBufferPool with max[Heap|Direct]Memory to limit the amount of memory that is leaked.
Eventually the pool will be full of "active" entries (the leaked ones) and will provide ByteBuffers that will be GCed normally.
_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();
_With jetty-home/jetty-base_
Create a ${jetty.base}/etc/retainable-byte-buffer-config.xml
<?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>And then reference it in ${jetty.base}/start.d/retainable-byte-buffer-config.ini
etc/retainable-byte-buffer-config.xml
References
https://github.com/eclipse/jetty.project/issues/8161
For more information
- Email us at [security@webtide.com](mailto:security@webtide.com)
Is GHSA-8mpp-f3f7-xc28 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.eclipse.jetty:jetty-server, and gives you the command that fixes it.
More advisories for org.eclipse.jetty:jetty-server
- HighCVE-2024-7708Eclipse Jetty: DoS attack triggering OutOfMemory with 100-Continue requests · 22 Jul 2026
- MediumCVE-2026-6790Eclipse Jetty: HTTP Authority/Host mismatch · 22 Jul 2026
- MediumCVE-2026-10051Eclipse Jetty: Cross-Request Leakage for trailers on HTTP/1.1 keep-alive connections · 22 Jul 2026
- HighCVE-2026-1605The Eclipse Jetty Server Artifact has a Gzip request memory leak · 5 Mar 2026
- HighCVE-2024-13009**UNSUPPORTED WHEN ASSIGNED** GzipHandler causes part of request body to be seen as request body of a separate request · 8 May 2025
- MediumCVE-2024-8184Eclipse Jetty's ThreadLimitHandler.getRemote() vulnerable to remote DoS attacks · 14 Oct 2024
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.