Update OpenTelemetry Core to patched version - #40
Merged
Conversation
Co-authored-by: adrienpessu <[email protected]>
Copilot
AI
changed the title
[WIP] Fix unbounded memory allocation in W3C Baggage propagation
Update OpenTelemetry Core to patched version
Sep 3, 2026
adrienpessu
marked this pull request as ready for review
September 3, 2026 13:05
There was a problem hiding this comment.
🟡 Changes recommended
The OpenTelemetry dependency set must be upgraded together rather than overriding Core alone.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates OpenTelemetry Core to address unbounded W3C Baggage parsing.
Changes:
- Overrides
@opentelemetry/coreto2.8.0. - Regenerates the npm lockfile.
File summaries
| File | Description |
|---|---|
package.json |
Adds the override, but forces Core 2.x into dependencies requiring Core 1.30.1, risking runtime failures. |
package-lock.json |
Locks Core 2.8.0 while retaining incompatible 1.x-generation instrumentation dependencies. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| }, | ||
| "@babel/core": "7.29.6" | ||
| "@babel/core": "7.29.6", | ||
| "@opentelemetry/core": "2.8.0" |
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.
@opentelemetry/coreallowed unbounded inbound W3C Baggage parsing. This update applies the patched limits for total baggage size, entry count, and per-entry size.@opentelemetry/coreto2.8.0, the lowest patched version.package-lock.jsonthrough npm.W3CBaggagePropagator.extract()calls or custom baggage transports are present.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>OpenTelemetry Core: Unbounded memory allocation in W3C Baggage propagation</alert_title>
<alert_description>## Overview
W3CBaggagePropagator.extract()in@opentelemetry/coredoes not enforce size limits when parsing inboundbaggageHTTP headers. The W3C Baggage specification recommends a maximum of 8,192 bytes and 180 entries; these limits were only enforced on the outbound (inject()) path, not on the inbound (extract()) path. Parsing oversized baggage causes memory allocation proportional to the header size without any cap.Impact
The practical availability impact for most Node.js deployments is limited. Node.js enforces a default
--max-http-header-sizeof 16,384 bytes on the total combined size of all HTTP headers, constraining what an external attacker can deliver before the propagator is reached. Additionally, the header is already in memory (parsed by the HTTP layer) by the time it reaches the propagator - the additional allocation is the overhead of splitting into entry objects, not an unbounded read.The risk is higher when transport-layer limits are absent - e.g., non-HTTP transports (messaging systems, custom
TextMapGetterimplementations) or deployments that have raised--max-http-header-size.Remediation
Update
@opentelemetry/coreto version 2.8.0 or later. The fix enforces limits consistent with the W3C Baggage specification at the propagator level:Headers that exceed these limits are truncated at the point the limit is reached.
Workarounds
Ensure header size limits are configured at the server or gateway level. The default Node.js HTTP header limit (16 KB) mitigates external attack vectors independently of this fix. For non-HTTP transports receiving baggage from untrusted sources, validate input size before passing it to the propagator.
References
Credit
Reported by tonghuaroot.</alert_description>
moderate
https://github.com/open-telemetry/opentelemetry-js/security/advisories/GHSA-8988-4f7v-96qf https://nvd.nist.gov/vuln/detail/CVE-2026-54285 https://github.com/advisories/GHSA-8988-4f7v-96qfGHSA-8988-4f7v-96qf, CVE-2026-54285
@opentelemetry/core
npm
<vulnerable_versions>1.30.1</vulnerable_versions>
<patched_version>2.8.0</patched_version>
<manifest_path>package-lock.json</manifest_path>
<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific items. If the vulnerable code path is reachable, explain how (which files, APIs, or call sites use the affected functionality) and note that the codebase is actively exposed to this vulnerability. If the vulnerable code path is not reachable, explain why (e.g. the affected API is never called, the vulnerable configuration is not used) and note that the update is primarily to satisfy vulnerability scanners rather than to address an active risk. If the advisory is too vague to determine reachability (e.g. 'improper input validation' with no specific API named), state that reachability could not be determined and explain why. Include a confidence level in the reachability assessment (e.g. high confidence if the advisory names a specific API and you confirmed it is or is not called, low confidence if the usage is indirect and hard to trace). If no patched version is available, check the alert_description field for a Workarounds section — the advisory may describe configuration changes or usage patterns that mitigate the vulnerability without a version update. If a workaround is available, apply it and leave a code comment referencing the advisory identifier explaining it is a temporary mitigation. If neither a patch nor a workaround is available, explain in the PR description why the alert cannot be resolved automatically so a human reviewer can take over. Inspect the repository to determine which package manager is used (e.g. lock files, config files, build scripts) and use that tooling to perform the update — do not edit loc...