CVE-2026-45682: OpenTelemetry eBPF Instrumentation: CappedConcurrentHashMap leaks keys after removals

Published May 18, 2026
·
Updated

Summary

The custom CappedConcurrentHashMap introduced for Java TLS state tracking never removes keys from its insertion-order queue when entries are deleted. In long-running instrumented JVMs, repeated connection churn can therefore grow the queue without bound and exhaust heap memory.

Details

The vulnerable implementation is in pkg/internal/java/agent/src/main/java/io/opentelemetry/obi/java/instrumentations/util/CappedConcurrentHashMap.java#L11. New keys are appended to a ConcurrentLinkedQueue, and eviction only runs inside put() when map.size() > capacity.

The remove() method removes the key from the ConcurrentHashMap but leaves the key in the queue. Because evictIfNeeded() only checks map.size() > capacity, the queue can grow forever in workloads that insert and remove keys while keeping the live map below the cap.

This pattern is reachable from pkg/internal/java/agent/src/main/java/io/opentelemetry/obi/java/instrumentations/data/SSLStorage.java#L66, where cleanupConnectionBufMapping removes entries from bufConn and activeConnections, and removeBufferMapping removes entries from bufToBuf. In normal TLS connection lifecycles, those removals happen frequently.

PoC

Local testing with a small Java reproducer showed queue growth continuing after removals and eventually reached OutOfMemoryError, which matches the code-level leak mechanism described above.

Use a vulnerable Java agent build from v0.0.0-rc.2+build.2 or any later release that still contains the change. Start any JVM process instrumented with OBI's Java TLS support, then generate a large number of short-lived TLS handshakes.

One local reproducer is:

bash git checkout v0.0.0-rc.2+build.2 make build

Start a simple TLS server:

bash openssl req -x509 -newkey rsa:2048 -nodes -keyout /tmp/key.pem -out /tmp/cert.pem -subj '/CN=localhost' -days 1 openssl sserver -accept 9443 -key /tmp/key.pem -cert /tmp/cert.pem -quiet

Run an instrumented JVM client that repeatedly opens and closes TLS connections:

java // save as /tmp/TLSChurn.java import javax.net.ssl.; import java.net.Socket;

public class TLSChurn { public static void main(String[] args) throws Exception { SSLContext ctx = SSLContext.getInstance("TLS"); ctx.init(null, new TrustManager[]{new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted(java.security.cert.X509Certificate[] c, String a) {} public void checkServerTrusted(java.security.cert.X509Certificate[] c, String a) {} }}, new java.security.SecureRandom());

SSLSocketFactory f = ctx.getSocketFactory(); for (;;) { try (Socket s = f.createSocket("127.0.0.1", 9443)) { s.getOutputStream().write("x".getBytes()); } catch (Exception ignored) {} } } }

Compile and run:

bash javac /tmp/TLSChurn.java java TLSChurn

Attach the vulnerable OBI Java instrumentation to the JVM. Over time, heap usage in the OBI Java agent process grows even though live connection counts remain bounded. A heap dump will show large retention from ConcurrentLinkedQueue nodes owned by CappedConcurrentHashMap.

Impact

This issue causes an availability loss in instrumented Java workloads that use OBI's TLS instrumentation. Repeated connection setup and teardown can grow the retained queue until the Java helper experiences long GC pauses or exhausts heap memory with OutOfMemoryError.

Other sources

OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. Prior to version 0.9.0, the custom CappedConcurrentHashMap introduced for Java TLS state tracking never removes keys from its insertion-order queue when entries are deleted. In long-running instrumented JVMs, repeated connection churn can therefore grow the queue without bound and exhaust heap memory. This issue has been patched in version 0.9.0.

MITRE

Affected Software

2 affected componentsFixes available
go/go.opentelemetry.io/obi<0.9.0
0.9.0
OpenTelemetry Ebpf Instrumentation Go<0.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/go.opentelemetry.io/obi to a version that resolves this vulnerability.

    Fixed in 0.9.0
  2. Upgrade

    Upgrade OpenTelemetry eBPF Instrumentation (Java agent) - OBI Java TLS support to a version that resolves this vulnerability.

    Fixed in 0.9.0
  3. Compensating control

    If you must run an instrumented JVM with the vulnerable agent, limit TLS connection churn/short-lived connection setup-teardown volume to reduce repeated key insert/remove patterns that cause unbounded growth in CappedConcurrentHashMap’s insertion-order queue.

Event History

May 18, 2026
Advisory Published
via GitHub·08:17 PM
Data Sourced
via GitHub·08:17 PM
DescriptionSeverityWeaknessAffected Software
Jun 2, 2026
CVE Published
via MITRE·03:23 PM
Data Sourced
via MITRE·03:23 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45682?

CVE-2026-45682 has a high severity due to its potential to cause memory exhaustion in long-running applications.

2

How do I fix CVE-2026-45682?

To fix CVE-2026-45682, upgrade to the version of the affected package that is 0.9.0 or later.

3

What is the vulnerability in CVE-2026-45682?

CVE-2026-45682 is caused by the `CappedConcurrentHashMap` failing to remove keys from its insertion-order queue, leading to unbounded memory growth.

4

Who is affected by CVE-2026-45682?

Users of the `go.opentelemetry.io/obi` package versions prior to 0.9.0 are affected by CVE-2026-45682.

5

What applications utilize components vulnerable to CVE-2026-45682?

Applications instrumented with the OpenTelemetry eBPF instrumentation that use the affected package are at risk from CVE-2026-45682.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203