Dec 1, 2026·10 min read·3 visits
OpenTelemetry Collector's exporterhelper package uses an unescaped null-byte delimiter when constructing batch partition keys from client metadata. Attackers supplying multi-valued headers can force partition key collisions across tenants, leading to cross-tenant telemetry injection or leakage.
An improper data encoding vulnerability (CWE-172) exists in the OpenTelemetry Collector exporterhelper package between versions 0.147.0 and 0.163.x. When metadata-partitioned batching is enabled with multiple metadata keys, the partition key generator uses an unescaped null byte delimiter to concatenate key names and multi-valued header arrays. An authenticated attacker capable of sending multi-valued HTTP or gRPC headers to an ingress receiver can induce partition key collisions, causing cross-tenant telemetry data mixture, data poisoning, or unauthorized data exfiltration.
The OpenTelemetry Collector serves as a vendor-agnostic proxy and processing pipeline for receiving, transforming, and exporting telemetry data (traces, metrics, and logs). Within the collector architecture, the go.opentelemetry.io/collector/exporter/exporterhelper package provides foundational queuing, retrying, and batching capabilities shared across standard and third-party exporters, including OTLP/HTTP and OTLP/gRPC.
In release v0.147.0 (introduced via Pull Request #14139), exporterhelper added support for partitioned batching inside the sending_queue subsystem. In multi-tenant deployments, operators often configure ingress receivers with include_metadata: true to extract client HTTP headers or gRPC metadata—such as tenant identifiers or routing shards—and forward them to downstream backends. To prevent telemetry from different tenants from being merged into a single outbound request, administrators configure sending_queue::batch::partition::metadata_keys with a list of header keys used to segregate batches.
A serialization flaw in the partition key derivation logic (CWE-172: Improper Encoding or Decoding of Data) undermines this isolation mechanism. The partitioner constructs a composite lookup key by concatenating present metadata key names and their associated values using a single null byte (\x00) as an in-band delimiter, without length prefixing or delimiter escaping.
Because HTTP and gRPC allow clients to transmit multi-valued headers (represented in Go as a []string slice), an attacker with network access to the collector ingress can supply crafted header arrays or embedded null bytes that mimic the delimiter boundaries of subsequent metadata keys. This causes the partitioner to produce identical partition keys for distinct metadata contexts, resulting in cross-tenant batch merging, telemetry poisoning, and potential data exfiltration.
The root cause resides in metadataKeysPartitioner.GetKey(), defined in exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go. When a telemetry payload enters the exporter queue, GetKey() inspects the request's context.Context to extract client metadata via client.FromContext(ctx).Metadata and serializes the values corresponding to the configured p.keys slice into a single Go string used as the batch map key.
In versions 0.147.0 through 0.163.x, GetKey() iterates over each configured key name k in p.keys. If meta.Get(k) returns a non-empty string slice, the function writes a null byte separator (\x00) if a previous key was already written, appends the literal key name k, and then iterates through every string element val in the returned slice—prepending a \x00 byte before each value. If meta.Get(k) returns an empty slice, the key is skipped entirely and nothing is written to the buffer.
This design creates three distinct canonicalization failures. First, the delimiter (\x00) is indistinguishable from the separator placed between a key name and its values, the separator placed between multiple values of the same key, and the separator placed before the next key name. Second, omitting absent keys from the output stream shifts the positional boundaries of subsequent keys, allowing values from an earlier key to masquerade as a later key name and its value. Third, if a single header value contains a literal null byte ("a\x00b"), it serializes identically to a multi-valued header containing two separate strings ("a" and "b").
Furthermore, a boundary ambiguity exists between an omitted key and a key containing an empty string. For example, if p.keys is configured as ["x-shard", "x-tenant"], a request where x-shard is omitted and x-tenant is "value" produces "x-tenant\x00value". A request where x-shard is [""] (an empty string) and x-tenant is "value" produces "x-shard\x00\x00x-tenant\x00value", whereas a multi-valued payload with empty segments can shift token positions arbitrarily across key boundaries.
The vulnerability was remediated in commit 24210a76696065012d05a501262c9d91ca19eb48 by replacing the delimiter-separated buffer construction with an unambiguous positional, count-prefixed, and length-prefixed binary encoding scheme.
Below is the diff from exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go:
diff --git a/exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go b/exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go
--- a/exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go
+++ b/exporter/exporterhelper/internal/queuebatch/metadata_partitioner.go
@@ -4,8 +4,8 @@ package queuebatch // import "go.opentelemetry.io/collector/exporter/exporterhel
package queuebatch
import (
- "bytes"
"context"
+ "encoding/binary"
"go.opentelemetry.io/collector/client"
"go.opentelemetry.io/collector/exporter/exporterhelper/internal/request"
@@ -30,24 +30,19 @@ func (p *metadataKeysPartitioner) GetKey(
ctx context.Context,
_ request.Request,
) string {
- var kb bytes.Buffer
+ kb := make([]byte, 0, 64)
meta := client.FromContext(ctx).Metadata
- var afterFirst bool
+ // Key positions are fixed; counts and lengths disambiguate all value boundaries.
for _, k := range p.keys {
- if values := meta.Get(k); len(values) != 0 {
- if afterFirst {
- kb.WriteByte(0)
- }
- kb.WriteString(k)
- afterFirst = true
- for _, val := range values {
- kb.WriteByte(0)
- kb.WriteString(val)
- }
+ values := meta.Get(k)
+ kb = binary.AppendUvarint(kb, uint64(len(values)))
+ for _, val := range values {
+ kb = binary.AppendUvarint(kb, uint64(len(val)))
+ kb = append(kb, val...)
}
}
- return kb.String()
+ return string(kb)
}In the unpatched code, the condition if values := meta.Get(k); len(values) != 0 skips absent keys and writes k followed by \x00-prefixed value strings into kb. Because no structural metadata (such as slice length or string byte length) is recorded, the parser cannot distinguish between data bytes and control delimiters.
In the patched version, the code makes three structural improvements:
p.keys is static for the lifetime of the partitioner instance, the key names (k) are no longer written into the byte slice. Every configured key occupies a deterministic sequential slot in the output.k in p.keys, the serializer unconditionally appends the number of values (uint64(len(values))) encoded as an unsigned variable-length integer via binary.AppendUvarint. If a key has no values, a 0x00 varint is recorded at that key's slot, preventing positional shifting.val, the serializer writes uint64(len(val)) via binary.AppendUvarint. This guarantees injective serialization (a one-to-one mapping between distinct [][]string inputs and the resulting byte string), rendering delimiter injection mathematically impossible.> [!NOTE]
> The fix is complete against partition key collisions. Because both the outer slice dimension and inner string lengths are explicitly framed with Uvarint before their payload bytes, no combination of multi-valued headers, empty strings, or embedded null bytes can produce an overlapping byte sequence.
Exploiting GHSA-cx3c-rmcx-ff35 requires a specific collector pipeline configuration and network access to an ingress receiver (such as otlpreceiver). First, the target collector must have an exporter configured with sending_queue enabled, batch enabled, and sending_queue::batch::partition::metadata_keys populated with at least two keys (for example, ["x-shard", "x-tenant"]). Second, the upstream receiver must have include_metadata: true enabled so incoming HTTP headers or gRPC metadata populate client.FromContext(ctx).Metadata.
receivers:
otlp:
protocols:
http:
include_metadata: true
exporters:
otlphttp:
sending_queue:
enabled: true
batch:
partition:
metadata_keys:
- x-shard
- x-tenantUnder this configuration, a legitimate tenant (Victim) sends telemetry with the headers x-shard: s and x-tenant: tenant-victim. When GetKey() processes the Victim's request, it iterates over ["x-shard", "x-tenant"] and generates the partition key:
x-shard\x00s\x00x-tenant\x00tenant-victimAn attacker aiming to collide with this batch sends a request within the same batch flush window, omitting the x-tenant header entirely (or when blocked by an edge proxy from setting x-tenant directly) while supplying multiple values for the x-shard header:
POST /v1/traces HTTP/1.1
Host: collector.example.com
Content-Type: application/x-protobuf
x-shard: s
x-shard: x-tenant
x-shard: tenant-victimWhen the collector receives repeated x-shard headers, meta.Get("x-shard") returns the three-element slice []string{"s", "x-tenant", "tenant-victim"}, and meta.Get("x-tenant") returns nil. When GetKey() executes on the attacker's request, it processes only the x-shard loop iteration:
"x-shard"\x00 + first value: "\x00s"\x00 + second value: "\x00x-tenant"\x00 + third value: "\x00tenant-victim"x-tenant iteration because len(values) == 0.The resulting partition key string is "x-shard\x00s\x00x-tenant\x00tenant-victim", which is byte-for-byte identical to the Victim's partition key. The upstream regression test added in commit 24210a76696065012d05a501262c9d91ca19eb48 confirms this exact collision vector along with two additional variants:
{
name: "key boundaries",
first: map[string][]string{"x-shard": {"s", "x-tenant", "tenant-victim"}},
second: map[string][]string{"x-shard": {"s"}, "x-tenant": {"tenant-victim"}},
},
{
name: "value boundaries",
first: map[string][]string{"x-shard": {"a\x00b"}},
second: map[string][]string{"x-shard": {"a", "b"}},
},
{
name: "missing and empty string",
first: map[string][]string{"x-tenant": {"value"}},
second: map[string][]string{"x-shard": {""}, "x-tenant": {"value"}},
},The security impact of a partition key collision stems from how exporterhelper merges request contexts when flushing a batch. When multiple requests are assigned to the same partition key, the batch processor merges their telemetry payloads and calls the context merger created by NewMetadataKeysMergeCtx(keys). This function takes (ctx1, _ context.Context) and retains only the metadata from ctx1—the first request that initialized the current batch window—while silently discarding the metadata of all subsequent requests merged into that batch.
Consequently, the outcome of exploitation depends on request arrival ordering within the active batch collection window:
I:H): If the victim tenant's request arrives first (ctx1), the batch adopts the victim's genuine x-shard: ["s"] and x-tenant: ["tenant-victim"] headers. When the attacker's colliding request arrives before the batch flushes, the attacker's spoofed traces, metrics, or logs are appended directly to the victim's batch and exported downstream under the victim's authenticated tenant headers. This allows an attacker to inject false audit logs, corrupt service-level metrics, or trigger false alerts in the victim's observability platform.C:L): If the attacker's request arrives first (ctx1), the batch adopts the attacker's metadata context (x-shard: ["s", "x-tenant", "tenant-victim"] with no x-tenant header, or an attacker-controlled routing destination). When the victim's request arrives in the same window, the victim's sensitive telemetry payloads (which frequently contain internal URLs, SQL queries, PII, or session tokens in span attributes and log bodies) are merged into the attacker-initialized batch and exported using the attacker's headers.The vulnerability is scored at CVSS 5.9 (Medium) (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N). Attack Complexity is rated High (AC:H) because the attacker must know or guess the configured sequence of metadata_keys, know a valid victim tenant identifier, and time requests to coincide with the victim's active batch window. Availability is unaffected (A:N).
To permanently resolve GHSA-cx3c-rmcx-ff35, upgrade the go.opentelemetry.io/collector/exporter/exporterhelper Go module and any deployed OpenTelemetry Collector distributions (opentelemetry-collector core or opentelemetry-collector-contrib) to version 0.164.0 or later. Custom collector distributions built using the OpenTelemetry Collector Builder (ocb) should update their manifest dependencies to reference v0.164.0 and recompile.
If an immediate upgrade to v0.164.0 cannot be performed, operators can eliminate the attack vector by applying any one of the following configuration workarounds:
sending_queue::batch::enabled: false) so each request is exported individually with its own isolated context. Alternatively, if downstream endpoints do not require partitioned batches, remove metadata_keys from sending_queue::batch::partition.exporters:
otlphttp:
sending_queue:
enabled: true
batch:
enabled: falseDisable Metadata Propagation at Ingress: If downstream exporters do not rely on client-supplied HTTP/gRPC headers, set include_metadata: false (the default setting) on all ingress receivers.
Enforce Header Normalization at the Edge Proxy: Place a reverse proxy (such as Envoy or NGINX) in front of the OpenTelemetry Collector ingress to sanitize headers used in metadata_keys. Configure the proxy to reject or strip requests containing multi-valued (repeated) header instances or null bytes for any key listed in metadata_keys, and ensure authentication middleware overwrites tenant identity headers authoritatively rather than trusting client-supplied values.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
go.opentelemetry.io/collector/exporter/exporterhelper OpenTelemetry | >= 0.147.0, < 0.164.0 | 0.164.0 |
opentelemetry-collector OpenTelemetry | >= v0.147.0, < v0.164.0 | v0.164.0 |
| Attribute | Detail |
|---|---|
| Advisory ID | GHSA-cx3c-rmcx-ff35 |
| Weakness Class | CWE-172 (Improper Encoding or Decoding of Data) |
| CVSS v3.1 Score | 5.9 Medium (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N) |
| Affected Component | go.opentelemetry.io/collector/exporter/exporterhelper |
| Vulnerable Versions | >= 0.147.0, < 0.164.0 |
| Patched Version | 0.164.0 |
| Primary Impact | Cross-Tenant Telemetry Mixture, Data Poisoning, and Exfiltration |
| Exploit Maturity | Proof-of-Concept (Unit Test Harness); Not in CISA KEV |
The software does not properly encode or decode data when serializing complex, multi-valued structures into a flat string, resulting in ambiguous boundaries between elements.
CVE-2026-137187 (GHSA-5xhm-p3jx-2fmc) is a missing authorization vulnerability (CWE-862) in @zereight/mcp-gitlab affecting versions 2.2.5 through 2.3.6. The flaw exists within the gitlab_api_request tool, where project allowlist enforcement fails open when evaluating API paths that do not conform to the /projects/:id pattern or when following HTTP redirects to an empty relative path. Attackers or compromised LLM agents with access to the api toolset can bypass project isolation boundaries to query or modify group, user, and instance-level GitLab resources permitted by the server's underlying authentication token.
Hugo versions 0.152.0 through 0.167.x contain a path traversal and sandbox bypass vulnerability in the module configuration loader. When a root project does not define module replacements, Hugo permits imported themes or modules to define their own module.replacements directives. Because replaced module imports are internally marked as project-replaced, they bypass theme directory path restrictions, allowing an untrusted theme to mount arbitrary host filesystem directories and expand the Node.js read sandbox.
CVE-2026-135388 (GHSA-7c2r-jhm9-43vf) is an improper verification of cryptographic signature vulnerability (CWE-347) in Pion DTLS, a pure Go implementation of Datagram Transport Layer Security (RFC 6347). The vulnerability stems from signature scheme confusion and missing cryptographic parameter binding in the handshake verification functions verifyKeySignature and verifyCertificateVerify. By presenting a genuine peer certificate paired with an incompatible or digest-less signature hash algorithm on the wire, an unauthenticated network adversary can bypass signature verification without possessing the peer's private key. This allows peer impersonation and full compromise of confidentiality and integrity in DTLS-protected channels, including WebRTC sessions utilizing SDP certificate fingerprint verification.
CVE-2026-134024 is a Server-Side Request Forgery (SSRF) vulnerability (CWE-918) in the TastyIgniter open-source restaurant management platform prior to version 4.4.4. The flaw resides in the Media::addFromUrl() helper method within the tastyigniter/core package, which initiates outbound HTTP GET requests to caller-supplied URLs and persists the response body without validating the URI scheme, target hostname, or resolved IP address. Although unreachable in a default unextended installation, the method functions as a latent SSRF gadget that exposes the host environment to internal network reconnaissance and cloud metadata extraction when invoked by third-party extensions or custom application code.
CVE-2026-61832 is a compound vulnerability in NukeViet CMS versions prior to 4.6.00 resulting from disabled TLS certificate validation (CWE-295) in internal HTTP clients and unrestricted PHP deserialization (CWE-502) in administrative extension store handlers. An adversary-in-the-middle (AiTM) attacker can intercept outbound HTTPS connections to the NukeViet extension store API and inject a crafted serialized PHP object. When an administrator interacts with the extension store, the application deserializes the response, triggering an in-tree Property-Oriented Programming (POP) gadget chain in Guzzle to achieve arbitrary file write and remote code execution.
CVE-2026-69217 (also tracked as GHSA-p83c-4wj9-p6w9) is an HTTP request and response smuggling vulnerability in the ember-core module of the http4s Scala library. Prior to versions 0.23.35 and 1.0.0-M47, the HTTP/1.1 message parser failed to reject HTTP messages containing duplicate Content-Length header fields with conflicting values or sign-prefixed numeric values. Instead of returning a 400 Bad Request error as mandated by RFC 9112 Section 6.3, the parser accepted all occurrences sequentially and honored the final Content-Length value, while also permitting negative numbers via Scala's standard string-to-long conversion. When deployed behind a reverse proxy or intermediary that prioritizes the first Content-Length header or handles non-digit characters differently, unauthenticated remote attackers can desynchronize persistent HTTP/1.1 connections to perform web cache poisoning, bypass front-end security controls, and capture cross-user HTTP requests.