Repository navigation
Comply with W3C Baggage specification limits - #7880
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7880 +/- ##
=====================================
Coverage 81.7% 81.7%
=====================================
Files 304 304
Lines 23287 23331 +44
=====================================
+ Hits 19037 19077 +40
- Misses 3863 3866 +3
- Partials 387 388 +1
🚀 New features to boost your workflow:
|
I don't think dropping all baggage is the correct interpretation of this requirement. We cannot propagate any "partial list-members", but it doesn't mean we cannot propagate complete list-members. Infact, the specification specifically states:
While dropping all may indeed be a valid "selection" of list-members, I think we can do better and just take the first, or last |
Yeah. And, this will need to refactor |
MrAlias
left a comment
There was a problem hiding this comment.
Overall this looks good. It addresses the critical security issue, looks W3C specification compliant, and is well tested. The error handling of Parse can be improved, and the issue in extractMultiBaggage, where it silently drops headers, needs to be fixed.
There was a problem hiding this comment.
Pull request overview
Updates OpenTelemetry Go baggage parsing and propagation to enforce W3C Baggage size/member limits (64 members, 8192 bytes) and adjusts tests/changelog accordingly.
Changes:
- Reduce max baggage members to 64 and remove the per-member byte limit.
- Apply byte/member limit enforcement while parsing baggage strings and when extracting from multiple
baggageheaders. - Add/adjust unit tests and document the change in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
propagation/baggage.go |
Adds combined multi-header limit handling for member count and total bytes. |
propagation/baggage_test.go |
Adds helper generators and new multi-header limit/behavior test cases. |
baggage/baggage.go |
Updates constants and changes Parse behavior to truncate to W3C limits instead of erroring. |
baggage/baggage_test.go |
Updates tests for new limit behavior and removed per-member limit. |
CHANGELOG.md |
Notes W3C baggage limit compliance changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8858ccc to
1b59ccf
Compare
Updates OpenTelemetry-Go and its companion modules from v1.43.0 to v1.44.0 to address CVE-2026-41178 (GHSA-5wrp-cwcj-q835), a denial-of-service vulnerability in the baggage module. OpenTelemetry-Go versions 1.41.0 and 1.43.0 removed raw-length rejection in baggage.Parse, allowing arbitrarily large/invalid baggage headers to exhaust resources during parsing. Version 1.44.0 restores the raw-length check. Updates: - go.opentelemetry.io/otel: v1.43.0 → v1.44.0 - go.opentelemetry.io/otel/metric: v1.43.0 → v1.44.0 - go.opentelemetry.io/otel/sdk: v1.43.0 → v1.44.0 - go.opentelemetry.io/otel/trace: v1.43.0 → v1.44.0 Advisory: GHSA-5wrp-cwcj-q835 Upstream fix: open-telemetry/opentelemetry-go#7880
|
It seems that some of the commits are required to fix version 1.43.0, but not all of them as trying to apply them gives a reject message about previously applied changes. Can someone enlighten me which commit need to be applied to fix 1.43.0? |
…1.44.0 for CVE-2026-41178 Bump go.opentelemetry.io/otel and its lockstep modules (otel/metric, otel/sdk, otel/trace) from v1.43.0 to v1.44.0 to remediate CVE-2026-41178 (GHSA-5wrp-cwcj-q835): OpenTelemetry-Go Denial of Service via oversized baggage headers. otel v1.41.0 and v1.43.0 removed raw-length rejection, allowing baggage.Parse to process arbitrarily large/invalid baggage headers and log errors, enabling DoS via oversized inputs. v1.44.0 restores the raw-length check (len(bStr) > maxBytesPerBaggageString) in baggage.Parse. Upstream fix: open-telemetry/opentelemetry-go#7880 Advisory: GHSA-5wrp-cwcj-q835 vendor updated via: go get ...@v1.44.0 && go mod tidy && go mod vendor
…026-41178 Bumps go.opentelemetry.io/otel from v1.43.0 to v1.44.0 to address CVE-2026-41178 (GHSA-5wrp-cwcj-q835), a moderate (CVSS 5.3) denial-of-service vulnerability in baggage header parsing. The go.opentelemetry.io/otel/baggage and go.opentelemetry.io/otel/propagation packages (both part of the otel module, and vendored and used by this repository) processed arbitrarily large/invalid baggage headers after an upfront raw-length check was removed upstream. v1.44.0 restores the raw-length rejection in baggage.Parse. The sibling modules go.opentelemetry.io/otel/metric, go.opentelemetry.io/otel/sdk, and go.opentelemetry.io/otel/trace are bumped to v1.44.0 as well to keep the OpenTelemetry modules aligned with the core otel module. The Go directive is unchanged (go 1.26.0); v1.44.0 is compatible with the release-5.0 toolchain, so no Go upgrade or sustaining fork is required. Upstream advisory: GHSA-5wrp-cwcj-q835 Upstream fix: open-telemetry/opentelemetry-go#7880 Related: OCPBUGS-108037 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Fix included in release 4.22.0-0.nightly-2026-09-03-092843 |
<https://github.com/open-telemetry/opentelemetry-go/> was added to allowed GitHub prefixes but we only allow GitHub security advisories to be fetched. <open-telemetry/opentelemetry-go#7880> is rejected according to the policy but we need to cached this outcome for evals to stay independent on external data. Fixes: commit c390f66 Related: https://redhat.atlassian.net/browse/AEGIS-495 Related: https://redhat.atlassian.net/browse/AEGIS-490
<https://github.com/open-telemetry/opentelemetry-go/> was added to allowed GitHub prefixes but we only allow GitHub security advisories to be fetched. <open-telemetry/opentelemetry-go#7880> is rejected according to the policy but we need to cached this outcome for evals to stay independent on external data. Fixes: commit c390f66 Related: https://redhat.atlassian.net/browse/AEGIS-495 Related: https://redhat.atlassian.net/browse/AEGIS-490
<https://github.com/open-telemetry/opentelemetry-go/> was added to allowed GitHub prefixes but we only allow GitHub security advisories to be fetched. <open-telemetry/opentelemetry-go#7880> is rejected according to the policy but we need to cached this outcome for evals to stay independent on external data. Fixes: commit c390f66 Related: https://redhat.atlassian.net/browse/AEGIS-495 Related: https://redhat.atlassian.net/browse/AEGIS-490
<https://github.com/open-telemetry/opentelemetry-go/> was added to allowed GitHub prefixes but we only allow GitHub security advisories to be fetched. <open-telemetry/opentelemetry-go#7880> is rejected according to the policy but we need to cached this outcome for evals to stay independent on external data. Fixes: commit c390f66 Related: https://redhat.atlassian.net/browse/AEGIS-495 Related: https://redhat.atlassian.net/browse/AEGIS-498
|
Fix included in release 5.1.0-0.nightly-2026-09-11-134220 |
|
Fix included in release 5.1.0-0.nightly-2026-09-11-221906 |
|
Fix included in release 5.0.0-0.nightly-2026-09-12-234912 |
|
Fix included in release 4.22.0-0.nightly-2026-09-15-174544 |
|
Fix included in release 5.1.0-0.nightly-2026-09-23-134227 |
|
Fix included in release 5.0.0-0.nightly-2026-10-07-134939 |
…026-41178 Bumps go.opentelemetry.io/otel from v1.43.0 to v1.44.0 to address CVE-2026-41178 (GHSA-5wrp-cwcj-q835), a moderate (CVSS 5.3) denial-of-service vulnerability in baggage header parsing. The go.opentelemetry.io/otel/baggage and go.opentelemetry.io/otel/propagation packages (both part of the otel module, and vendored and used by this repository) processed arbitrarily large/invalid baggage headers after an upfront raw-length check was removed upstream. v1.44.0 restores the raw-length rejection in baggage.Parse. The sibling modules go.opentelemetry.io/otel/metric, go.opentelemetry.io/otel/sdk, and go.opentelemetry.io/otel/trace are bumped to v1.44.0 as well to keep the OpenTelemetry modules aligned with the core otel module. The Go directive is unchanged (go 1.26.0); v1.44.0 is compatible with the release-5.0 toolchain, so no Go upgrade or sustaining fork is required. Upstream advisory: GHSA-5wrp-cwcj-q835 Upstream fix: open-telemetry/opentelemetry-go#7880 Related: OCPBUGS-108037 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Updates the baggage implementation to comply with https://www.w3.org/TR/baggage/#limits:
Changed maxMembers from 180 to 64 (the W3C compliance requirement)
Removed maxBytesPerMembers (4096) - this per-member limit was not part of the W3C spec
Added limit checking in extractMultiBaggage for multiple baggage headers:
This PR uses non-deterministic truncation when handling baggage limits.