Update Rust crate opentelemetry_sdk to 0.32.0 [SECURITY]#280
Open
renovate[bot] wants to merge 1 commit into
Open
Update Rust crate opentelemetry_sdk to 0.32.0 [SECURITY]#280renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
3ddc753 to
ea34f6d
Compare
ea34f6d to
3834cc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.31.0→0.32.0opentelemetry_sdk has unbounded memory allocation in W3C Baggage propagation
CVE-2026-48504 / GHSA-w9wp-h8wv-79jx
More information
Details
Summary
BaggagePropagator::extract_with_contextinopentelemetry_sdkdid not enforce the W3C Baggage size limits before parsing an inboundbaggageheader. 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:
Impact
Services that accept untrusted inbound propagation headers may experience increased per-request resource usage when processing oversized
baggageheaders. 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_sdkto version0.32.1or later.Version
0.32.1rejectsbaggageheader 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
baggageheaders larger than 8192 bytes before invoking OpenTelemetry propagation extraction. This can be enforced at a proxy, gateway, middleware layer, or custom carrier boundary.Resources
Credit
tonghuaroot
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
open-telemetry/opentelemetry-rust (opentelemetry_sdk)
v0.32.1Released 2026-May-23
BaggagePropagatornow enforces the W3C Baggage maximum header length(8192 bytes) and maximum list-member count (64) when extracting an inbound
baggageheader. Headers exceeding 8192 bytes are dropped at thepropagator 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
on
Baggageinsert. See https://www.w3.org/TR/baggage/#limits.SimpleSpanProcessortelemetry suppression added in 0.32.0(see #3494), which caused a
RefCell already borrowedpanic when a spanwas started and dropped inside a
get_active_span(orContext::map_current)closure. Tracked in #3510. A proper fix for the underlying
Context::map_currentre-entrancy will be investigated separately, afterwhich the suppression can be safely re-applied.
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.0Compare Source
Released 2026-May-08
SimpleSpanProcessornow suppresses telemetry during export, preventingtelemetry-induced-telemetry feedback loops. This aligns with the existing
behavior in
BatchSpanProcessorandSimpleLogProcessor.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.
Counter::bind()andHistogram::bind()SDK implementations thatreturn 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. If
bind()is called at the cardinality limit, the handle binds directly tothe overflow tracker — its writes stay on the same direct (no-lookup) hot
path and consistently land in the
otel.metric.overflow=truebucket forthe lifetime of the handle. To recover a bound handle after delta collection
frees space, drop the existing handle and call
bind()again. Gated behindthe
experimental_metrics_bound_instrumentsfeature flag. Benchmarks show~28x speedup for counter operations and ~9x for histograms.
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.
testingfeature is now runtime agnostic. #3407TokioSpanExporterandnew_tokio_test_exporterhave been renamed toTestSpanExporterandnew_test_exporter.tokio/rt,tokio/time,tokio/macros,tokio/rt-multi-thread,tokio-stream,experimental_async_runtimeInstrumentationScopeinArcinternally inSdkTracer, making tracer clones cheaper (Arc refcount increment instead of deep copy).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.service.nameResource attribute fallback to follow OpenTelemetryspecification by using
unknown_service:<process.executable.name>format whenservice name is not explicitly configured. Previously, it only used
unknown_service.SpanExporter::shutdown()default timeout from 5 nanoseconds to 5 seconds.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.Resource::get_ref(&self, key: &Key) -> Option<&Value>to allow retrieving a reference to a resource value without cloning.SdkTracer#3227:id_generator,should_sampleopentelemetry::tracetoopentelemetry_sdk::trace#3277:SamplingDecision,SamplingResultopentelemetry_sdk::traceinstead.StreamBuilder::build()now rejectsusize::MAXas a cardinality limitwith a validation error. #3506
TracerProviderBuilder::with_samplerallows to pass boxed instance ofShouldSample[#3313][3313]SpanProcessor::on_endcallsContext::current()(#3262).SpanProcessor::on_enddocumentation to clarify thatContext::current()returns the parent context, not the span's contexttraceparentheaders 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. #3435InMemoryExporterErrorhas been removed and replaced byOTelSdkError, and a newJaegerRemoteSamplerBuildErrorintroduced to replace last uses ofTraceError. #3458backing specification) is now stable and is enabled by default. #3278
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.