{"id":"CVE-2026-81872","aliases":["CVE-2026-81872","GHSA-hjf4-fphr-2h65","GO-2026-6615"],"related":[],"kind":"vulnerability","state":"published","title":"OpenTelemetry-Go: BatchProcessor can busy-spin when export buffer is full","summary":"OpenTelemetry-Go is the Go implementation of OpenTelemetry. Prior to version 0.21.0, the go.opentelemetry.io/otel/sdk/log BatchingProcessor can enter a tight CPU loop when attacker-driven log emission fills its asynchronous export buffer while the exporter is backpressured. NewBatchingProcessor wraps the exporter with newBufferExporter(exporter, 1), and the poll loop calls queue.TryDequeue and bufferExporter.EnqueueExport before immediately signaling pollTrigger whenever the queue remains at or above batchSize. Because a failed nonblocking EnqueueExport leaves the queue length unchanged, the processor repeatedly retries without waiting for its ticker, exhausting CPU and degrading or denying service in the embedding process. This issue is fixed in version 0.21.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenTelemetry-Go is the Go implementation of OpenTelemetry. Prior to version 0.21.0, the go.opentelemetry.io/otel/sdk/log BatchingProcessor can enter a tight CPU loop when attacker-driven log emission fills its asynchronous export buffer while the exporter is backpressured. NewBatchingProcessor wraps the exporter with newBufferExporter(exporter, 1), and the poll loop calls queue.TryDequeue and bufferExporter.EnqueueExport before immediately signaling pollTrigger whenever the queue remains at or above batchSize. Because a failed nonblocking EnqueueExport leaves the queue length unchanged, the processor repeatedly retries without waiting for its ticker, exhausting CPU and degrading or denying service in the embedding process. This issue is fixed in version 0.21.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA `BatchingProcessor` in `go.opentelemetry.io/otel/sdk/log` can enter a tight CPU loop when the asynchronous export buffer is full. Under exporter backpressure, attacker-driven high-volume log emission can keep the queue at or above the batch size, causing repeated immediate export retries and a denial of service through CPU exhaustion.\n\nIntroduced in commit: 4af9c20\n\n### Details\n\n`NewBatchingProcessor` wraps the exporter with `newBufferExporter(exporter, 1)` (`sdk/log/batch.go:116-122`), so the asynchronous export input can fill quickly when the downstream exporter blocks. The poll goroutine dequeues a batch with `b.q.TryDequeue`, calls `b.exporter.EnqueueExport(r)`, and then immediately sends on `b.pollTrigger` whenever `qLen >= b.batchSize` (`sdk/log/batch.go:129-165`).\n\n`bufferExporter.EnqueueExport` is non-blocking: it sends to `e.input` if possible and returns `false` in the `default` case when the channel is full (`sdk/log/exporter.go:221-248`). `TryDequeue` leaves `q.len` unchanged when the write callback returns `false` (`sdk/log/batch.go:289-314`). Therefore, while the exporter is backpressured, `EnqueueExport` fails, the queue remains at or above one full batch, and the poll loop continuously retriggers itself without waiting for the ticker.\n\n### PoC\n\n[validation-artifact.zip](https://github.com/user-attachments/files/27494002/validation-artifact.zip)\n\nThe validation artifact contains a PoC bundle:\n\n- `validation-artifact.tar:main.go`: PoC source.\n- `validation-artifact.tar:README.md`: build/run notes.\n- `validation-artifact.tar:build_failed.log`: captured build failure from the validation environment.\n\nThe PoC configures a blocking exporter and a `BatchingProcessor` with `WithExportMaxBatchSize(1)`, `WithExportInterval(5*time.Second)`, and `WithMaxQueueSize(2048)`. It emits 1000 records, records a CPU profile for 750 ms while the exporter is blocked, then writes `/workspace/validation_artifacts/busyloop.pprof`.\n\nReproduction steps from an affected checkout at commit `4af9c20`:\n\n```sh\ncd /workspace/opentelemetry-go\ngit checkout 4af9c20\n\nmkdir -p validation_poc/busyloop /workspace/validation_artifacts /tmp/batchingprocessor-busyloop-poc\ntar -xf /path/to/this/finding/validation-artifact.tar -C /tmp/batchingprocessor-busyloop-poc\ncp /tmp/batchingprocessor-busyloop-poc/main.go validation_poc/busyloop/main.go\n\ngo build -o validation_poc/busyloop/busyloop ./validation_poc/busyloop\n./validation_poc/busyloop/busyloop\ngo tool pprof -top /workspace/validation_artifacts/busyloop.pprof\n```\n\nExpected program output:\n\n```text\ncpu profile written to /workspace/validation_artifacts/busyloop.pprof\n```\n\nExpected profile evidence: hot functions should include `(*BatchingProcessor).poll`, `(*queue).TryDequeue`, and `(*bufferExporter).EnqueueExport`, showing repeated export attempts while the exporter is blocked.\n\n\n### Impact\n\nThis is an availability vulnerability: uncontrolled CPU consumption caused by a busy-spin retry loop. Applications using `sdk/log` `BatchingProcessor` are impacted when an attacker can cause sustained log emission and the configured exporter or downstream collector is slow, blocked, or otherwise backpressured. The impact is limited to the embedding process but can degrade or deny service for that application.","format":"markdown","source":"ghsa"},{"lang":"en","text":"OpenTelemetry-Go: BatchProcessor can busy-spin when export buffer is full in go.opentelemetry.io/otel/sdk/log","format":"markdown","source":"go"}],"published":"2026-09-16T20:42:23.507Z","modified":"2026-10-01T20:56:06.318Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-400","CWE-834"],"affected":[{"ranges":[{"version":"< 0.21.0","status":"affected"}],"vendor":"open-telemetry","product":"opentelemetry-go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.21.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/otel/sdk/log","purl":"pkg:golang/go.opentelemetry.io/otel/sdk/log","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.21.0"}],"ecosystem":"Go","package":"go.opentelemetry.io/otel/sdk/log","purl":"pkg:golang/go.opentelemetry.io/otel/sdk/log","source":"go"}],"references":[{"url":"https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-hjf4-fphr-2h65","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-go/issues/6797","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-go/pull/8620","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-go/commit/ba71b09e6ed272e93a669aeaec1e98b1df4cc582","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/log/v0.21.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81872","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/open-telemetry/opentelemetry-go","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-09-17T13:36:11.140Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-81872","url":"https://www.cve.org/CVERecord?id=CVE-2026-81872","licence":"CVE Terms of Use","modified":"2026-09-17T13:36:27.289Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hjf4-fphr-2h65","url":"https://github.com/advisories/GHSA-hjf4-fphr-2h65","licence":"CC-BY-4.0","modified":"2026-10-01T20:56:06.318Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6615","url":"https://pkg.go.dev/vuln/GO-2026-6615","licence":"CC-BY-4.0","modified":"2026-10-01T20:45:14.982Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-81872","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81872","licence":"Public domain","modified":"2026-09-30T17:43:24.057Z"}],"updatedAt":"2026-11-25T22:59:39.160Z","epss":{"score":0.00383,"percentile":0.34462,"date":"2026-12-01T12:00:22.000Z"}}