{"id":"CVE-2026-45682","aliases":["CVE-2026-45682","GHSA-962q-hwm5-52x5","GO-2026-5275"],"related":[],"kind":"vulnerability","state":"published","title":"OpenTelemetry eBPF Instrumentation: CappedConcurrentHashMap leaks keys after removals","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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.\n\n### Details\n\nThe vulnerable implementation is in [pkg/internal/java/agent/src/main/java/io/opentelemetry/obi/java/instrumentations/util/CappedConcurrentHashMap.java#L11](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/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`.\n\nThe `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.\n\nThis pattern is reachable from [pkg/internal/java/agent/src/main/java/io/opentelemetry/obi/java/instrumentations/data/SSLStorage.java#L66](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/360521f411213566a3b557a1f0c093e6cd68a4de/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.\n\n### PoC\n\nLocal 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.\n\nUse 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.\n\nOne local reproducer is:\n\n```bash\ngit checkout v0.0.0-rc.2+build.2\nmake build\n```\n\nStart a simple TLS server:\n\n```bash\nopenssl req -x509 -newkey rsa:2048 -nodes -keyout /tmp/key.pem -out /tmp/cert.pem -subj '/CN=localhost' -days 1\nopenssl s_server -accept 9443 -key /tmp/key.pem -cert /tmp/cert.pem -quiet\n```\n\nRun an instrumented JVM client that repeatedly opens and closes TLS connections:\n\n```java\n// save as /tmp/TLSChurn.java\nimport javax.net.ssl.*;\nimport java.net.Socket;\n\npublic class TLSChurn {\n  public static void main(String[] args) throws Exception {\n    SSLContext ctx = SSLContext.getInstance(\"TLS\");\n    ctx.init(null, new TrustManager[]{new X509TrustManager() {\n      public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; }\n      public void checkClientTrusted(java.security.cert.X509Certificate[] c, String a) {}\n      public void checkServerTrusted(java.security.cert.X509Certificate[] c, String a) {}\n    }}, new java.security.SecureRandom());\n\n    SSLSocketFactory f = ctx.getSocketFactory();\n    for (;;) {\n      try (Socket s = f.createSocket(\"127.0.0.1\", 9443)) {\n        s.getOutputStream().write(\"x\".getBytes());\n      } catch (Exception ignored) {}\n    }\n  }\n}\n```\n\nCompile and run:\n\n```bash\njavac /tmp/TLSChurn.java\njava TLSChurn\n```\n\nAttach 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`.\n\n### Impact\n\nThis 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`.","format":"markdown","source":"ghsa"},{"lang":"en","text":"OpenTelemetry eBPF Instrumentation: CappedConcurrentHashMap leaks keys after removals in go.opentelemetry.io/obi","format":"markdown","source":"go"},{"lang":"es","text":"OpenTelemetry eBPF Instrumentation proporciona instrumentación eBPF basada en el estándar OpenTelemetry. Antes de la versión 0.9.0, el CappedConcurrentHashMap personalizado introducido para el seguimiento del estado TLS de Java nunca elimina claves de su cola de orden de inserción cuando se eliminan entradas. En JVMs instrumentadas de larga duración, la rotación repetida de conexiones puede, por lo tanto, hacer crecer la cola sin límite y agotar la memoria del montón. Este problema ha sido parcheado en la versión 0.9.0.","source":"nvd"}],"published":"2026-05-18T20:17:33.000Z","modified":"2026-07-22T19:10:00.120Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401","CWE-770"],"affected":[{"ranges":[{"version":"< 0.9.0","status":"affected"}],"vendor":"open-telemetry","product":"opentelemetry-ebpf-instrumentation","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/obi","purl":"pkg:golang/go.opentelemetry.io/obi","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/obi","purl":"pkg:golang/go.opentelemetry.io/obi","source":"go"},{"ranges":[{"status":"affected","fixed":"0.9.0"}],"vendor":"opentelemetry","product":"ebpf_instrumentation","cpe":"cpe:2.3:a:opentelemetry:ebpf_instrumentation:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/security/advisories/GHSA-962q-hwm5-52x5","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.9.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45682","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-02T17:19:08.840Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45682","url":"https://www.cve.org/CVERecord?id=CVE-2026-45682","licence":"CVE Terms of Use","modified":"2026-06-02T17:20:47.453Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-962q-hwm5-52x5","url":"https://github.com/advisories/GHSA-962q-hwm5-52x5","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:08.892Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5275","url":"https://pkg.go.dev/vuln/GO-2026-5275","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:23.215Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45682","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45682","licence":"Public domain","modified":"2026-07-22T19:10:00.120Z"}],"updatedAt":"2026-11-25T22:59:23.574Z","epss":{"score":0.00162,"percentile":0.05552,"date":"2026-12-02T12:00:21.000Z"}}