CVE-2026-81872: OpenTelemetry-Go BatchProcessor Can Busy-spin When Export Vulnerability

MODERATE
Advisory Identifier: GHSA-hjf4-fphr-2h65
CWE-834 CWE-400
Published
Advisory Summary

CVE-2026-81872 is a MODERATE batchprocessor can busy-spin when export vulnerability (CWE-834: Excessive Iteration) affecting OpenTelemetry-Go libraries in the Go ecosystem. The issue involves batchprocessor can busy-spin when export buffer is full. Remediation is available by upgrading affected packages to version 0.21.0.

CVE-2026-81872 at a Glance

CVE Identifier CVE-2026-81872
GHSA Identifier GHSA-hjf4-fphr-2h65
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-834: Excessive Iteration
Affected Product OpenTelemetry-Go
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-81872

To remediate this vulnerability, upgrade all affected OpenTelemetry-Go dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

go.opentelemetry.io/otel/sdk/log fixed: 0.21.0
Upgrade go.opentelemetry.io/otel/sdk/log to 0.21.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for go.opentelemetry.io/otel/sdk/log

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-81872, inspect your project dependencies for OpenTelemetry-Go:

inspect dependencies for go.opentelemetry.io/otel/sdk/log

Analyze the terminal output to locate any version of OpenTelemetry-Go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-834: Excessive Iteration, where the product performs an iteration or loop without sufficiently limiting the number of times that the loop is executed. In OpenTelemetry-Go, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A `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. Introduced in commit: 4af9c20 ### Details `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`). `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. ### PoC [validation-artifact.zip](https://github.com/user-attachments/files/27494002/validation-artifact.zip) The validation artifact contains a PoC bundle: - `validation-artifact.tar:main.go`: PoC source. - `validation-artifact.tar:README.md`: build/run notes. - `validation-artifact.tar:build_failed.log`: captured build failure from the validation environment. The 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`. Reproduction steps from an affected checkout at commit `4af9c20`: ```sh cd /workspace/opentelemetry-go git checkout 4af9c20 mkdir -p validation_poc/busyloop /workspace/validation_artifacts /tmp/batchingprocessor-busyloop-poc tar -xf /path/to/this/finding/validation-artifact.tar -C /tmp/batchingprocessor-busyloop-poc cp /tmp/batchingprocessor-busyloop-poc/main.go validation_poc/busyloop/main.go go build -o validation_poc/busyloop/busyloop ./validation_poc/busyloop ./validation_poc/busyloop/busyloop go tool pprof -top /workspace/validation_artifacts/busyloop.pprof ``` Expected program output: ```text cpu profile written to /workspace/validation_artifacts/busyloop.pprof ``` Expected profile evidence: hot functions should include `(*BatchingProcessor).poll`, `(*queue).TryDequeue`, and `(*bufferExporter).EnqueueExport`, showing repeated export attempts while the exporter is blocked. ### Impact This 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.

CVE-2026-81872 Affected OpenTelemetry-Go Versions

1 component(s)
Fixed Versions:
0.21.0
Product / Package Ecosystem Affected Versions Fixed Version
go.opentelemetry.io/otel/sdk/log
Go
< 0.21.0
0.21.0

References

Frequently Asked Questions

What is CVE-2026-81872?
CVE-2026-81872 is a security vulnerability in OpenTelemetry-Go involving BatchProcessor can busy-spin when export buffer is full under CWE-834: Excessive Iteration.
Which OpenTelemetry-Go versions are affected?
Affected versions include releases prior to 0.21.0 across affected packages: go.opentelemetry.io/otel/sdk/log.
What version fixes CVE-2026-81872?
Upgrading to 0.21.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is go.opentelemetry.io/otel/sdk/log affected?
Yes, go.opentelemetry.io/otel/sdk/log is affected in releases prior to 0.21.0. Upgrade your dependency to 0.21.0 or later.
What CWE is associated with CVE-2026-81872?
CVE-2026-81872 is classified under CWE-834: Excessive Iteration (The product performs an iteration or loop without sufficiently limiting the number of times that the loop is executed.).
How can I check Go dependencies for CVE-2026-81872?
Run the dependency tree command: 'inspect dependencies for go.opentelemetry.io/otel/sdk/log'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hjf4-fphr-2h65",
  "modified" : "2026-09-29T17:59:53Z",
  "published" : "2026-09-29T17:59:53Z",
  "aliases" : [ "CVE-2026-81872" ],
  "summary" : "OpenTelemetry-Go: BatchProcessor can busy-spin when export buffer is full",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.opentelemetry.io/otel/sdk/log"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.21.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-hjf4-fphr-2h65"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-81872"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/issues/6797"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/pull/8620"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/commit/ba71b09e6ed272e93a669aeaec1e98b1df4cc582"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/log/v0.21.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-834" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-29T17:59:53Z",
    "nvd_published_at" : "2026-09-16T21:17:22Z"
  }
}