This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| opentelemetry_sdk (source) | dependencies | minor | 0.31.0 → 0.32.0 |
opentelemetry_sdk has unbounded memory allocation in W3C Baggage propagation
CVE-2026-48504 / GHSA-w9wp-h8wv-79jx
More information
Details
Summary
BaggagePropagator::extract_with_context in opentelemetry_sdk did not enforce the W3C Baggage size limits before parsing an inbound baggage header. A large attacker-controlled header could cause unnecessary CPU work and short-lived heap allocations while parsing entries that would later be discarded by the SDK's baggage storage limits.
The SDK now applies limits aligned with the W3C Baggage limits:
- 64 list-members
- 8192 bytes total
Impact
Services that accept untrusted inbound propagation headers may experience increased per-request resource usage when processing oversized baggage headers. This can contribute to denial-of-service risk, especially when application or transport-level header limits are absent or configured above the W3C Baggage limits.
The impact is limited to availability. This issue does not expose telemetry data, modify telemetry data, or allow code execution.
Patches
Upgrade opentelemetry_sdk to version 0.32.1 or later.
Version 0.32.1 rejects baggage header values larger than 8192 bytes and limits extraction to the first 64 list-members.
Workarounds
If upgrading immediately is not possible, reject or limit inbound baggage headers larger than 8192 bytes before invoking OpenTelemetry propagation extraction. This can be enforced at a proxy, gateway, middleware layer, or custom carrier boundary.
Resources
- W3C Baggage limits: https://www.w3.org/TR/baggage/#limits
- Related OpenTelemetry Java advisory: https://github.com/open-telemetry/opentelemetry-java/security/advisories/GHSA-rcgg-9c38-7xpx
- Related OpenTelemetry Go advisory: https://github.com/open-telemetry/opentelemetry-go/security/advisories/GHSA-mh2q-q3fh-2475
- CVE-2026-48504
Credit
tonghuaroot
Severity
- CVSS Score: 5.3 / 10 (Medium)
- Vector String:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- https://github.com/open-telemetry/opentelemetry-rust/security/advisories/GHSA-w9wp-h8wv-79jx
- https://github.com/advisories/GHSA-w9wp-h8wv-79jx
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
open-telemetry/opentelemetry-rust (opentelemetry_sdk)
v0.32.1
Released 2026-May-23
BaggagePropagatornow enforces the W3C Baggage maximum header length (8192 bytes) and maximum list-member count (64) when extracting an inboundbaggageheader. Headers exceeding 8192 bytes are dropped at the propagator boundary; headers with more than 64 list members are truncated to the first 64 entries. The change keeps the propagator from parsing attacker-controlled input beyond the W3C limits instead of doing per-entry parse, decode, and allocation work only to discard the excess onBaggageinsert. See https://www.w3.org/TR/baggage/#limits.- Reverted the
SimpleSpanProcessortelemetry suppression added in 0.32.0 (see #3494), which caused aRefCell already borrowedpanic when a span was started and dropped inside aget_active_span(orContext::map_current) closure. Tracked in #3510. A proper fix for the underlyingContext::map_currentre-entrancy will be investigated separately, after which the suppression can be safely re-applied. - View-provided metric stream
name(set viaStream::builder().with_name(...)) is no longer validated against the instrument name syntax, per spec clarification.unitand other stream parameters continue to be validated.
v0.32.0
Released 2026-May-08
SimpleSpanProcessornow suppresses telemetry during export, preventing telemetry-induced-telemetry feedback loops. This aligns with the existing behavior inBatchSpanProcessorandSimpleLogProcessor.- Removed
SimpleConcurrentLogProcessorand theexperimental_logs_concurrent_log_processorfeature flag. The use cases it was designed for (ETW/user_events exporters) are better served by modeling those exporters as processors directly. - Added
Counter::bind()andHistogram::bind()SDK implementations that return pre-bound measurement handles (BoundCounter<T>,BoundHistogram<T>). Bound instruments resolve the attribute-to-aggregator mapping once at bind time and cache the result, eliminating per-call HashMap lookups. View attribute filtering is applied at bind time so the hot path stays free of per-call attribute processing. Bound and unbound recordings with the same (post-view) attribute set always aggregate into the same data point, including the empty attribute set. Bound entries are never evicted during delta collection while a handle exists — idle cycles produce no export but the tracker persists. Ifbind()is called at the cardinality limit, the handle binds directly to the overflow tracker — its writes stay on the same direct (no-lookup) hot path and consistently land in theotel.metric.overflow=truebucket for the lifetime of the handle. To recover a bound handle after delta collection frees space, drop the existing handle and callbind()again. Gated behind theexperimental_metrics_bound_instrumentsfeature flag. Benchmarks show ~28x speedup for counter operations and ~9x for histograms. - Delta metrics collection now uses in-place eviction instead of draining the HashMap on every collect cycle. Stale attribute sets that received no measurements since the last collection are evicted. Note: recovery from cardinality overflow now requires 2 collect cycles — the first marks entries as stale, the second evicts them.
- Breaking The SDK
testingfeature is now runtime agnostic. #3407TokioSpanExporterandnew_tokio_test_exporterhave been renamed toTestSpanExporterandnew_test_exporter.- The following transitive dependencies and features have been removed:
tokio/rt,tokio/time,tokio/macros,tokio/rt-multi-thread,tokio-stream,experimental_async_runtime
- Store
InstrumentationScopeinArcinternally inSdkTracer, making tracer clones cheaper (Arc refcount increment instead of deep copy). - Add 32-bit platform support by using
portable-atomicforAtomicI64andAtomicU64in the metrics module. This enables compilation on 32-bit ARM targets (e.g.,armv5te-unknown-linux-gnueabi,armv7-unknown-linux-gnueabihf). Aggregationenum andStreamBuilder::with_aggregation()are now stable and no longer require thespec_unstable_metrics_viewsfeature flag.- Fix
service.nameResource attribute fallback to follow OpenTelemetry specification by usingunknown_service:<process.executable.name>format when service name is not explicitly configured. Previously, it only usedunknown_service. - Fix
SpanExporter::shutdown()default timeout from 5 nanoseconds to 5 seconds. - Breaking
SpanExportertrait methodsshutdown,shutdown_with_timeout, andforce_flushnow take&selfinstead of&mut selffor consistency withLogExporterandPushMetricExporter. Implementers using interior mutability (e.g.,Mutex,AtomicBool) require no changes. - Added
Resource::get_ref(&self, key: &Key) -> Option<&Value>to allow retrieving a reference to a resource value without cloning. - Breaking Removed the following public hidden methods from the
SdkTracer#3227:id_generator,should_sample
- Breaking Moved the following SDK sampling types from
opentelemetry::tracetoopentelemetry_sdk::trace#3277:SamplingDecision,SamplingResult- These types are SDK implementation details and should be imported from
opentelemetry_sdk::traceinstead.
StreamBuilder::build()now rejectsusize::MAXas a cardinality limit with a validation error. #3506- Fix Histogram boundaries being ignored in the presence of views #3312
TracerProviderBuilder::with_samplerallows to pass boxed instance ofShouldSample[#3313][3313]- Fix ObservableCounter and ObservableUpDownCounter now correctly report only data points from the current measurement cycle, removing stale attribute combinations that are no longer observed. #3248
- Fix panic when
SpanProcessor::on_endcallsContext::current()(#3262).- Updated
SpanProcessor::on_enddocumentation to clarify thatContext::current()returns the parent context, not the span's context
- Updated
- Fix
traceparentheaders with unknown flags (e.g. W3C random-trace-id flag0x02) being incorrectly rejected. Unknown flags are now accepted and zeroed out as required by the W3C trace-context spec. #3435 - Breaking
InMemoryExporterErrorhas been removed and replaced byOTelSdkError, and a newJaegerRemoteSamplerBuildErrorintroduced to replace last uses ofTraceError. #3458 - "spec_unstable_logs_enabled" feature flag is removed. The capability (and the backing specification) is now stable and is enabled by default. #3278
Configuration
📅 Schedule: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.