Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update OpenTelemetry Core to patched version - #40

Merged
adrienpessu merged 2 commits into
mainfrom
copilot/resolve-opentelemetry-vulnerability
Sep 3, 2026
Merged

Update OpenTelemetry Core to patched version#40
adrienpessu merged 2 commits into
mainfrom
copilot/resolve-opentelemetry-vulnerability

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@opentelemetry/core allowed unbounded inbound W3C Baggage parsing. This update applies the patched limits for total baggage size, entry count, and per-entry size.

  • Dependency update
    • Override transitive @opentelemetry/core to 2.8.0, the lowest patched version.
    • Regenerate package-lock.json through npm.
"overrides": {
  "@opentelemetry/core": "2.8.0"
}
  • Reachability assessment
    • Probot/Sentry OpenTelemetry instrumentation is included at runtime through the Azure Functions adapter.
    • No direct W3CBaggagePropagator.extract() calls or custom baggage transports are present.
    • Reachability is indirect; confidence: medium.
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/core does not enforce size limits when parsing inbound baggage HTTP 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-size of 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 TextMapGetter implementations) or deployments that have raised --max-http-header-size.

Remediation

Update @opentelemetry/core to version 2.8.0 or later. The fix enforces limits consistent with the W3C Baggage specification at the propagator level:

  • Maximum total baggage size: 8,192 bytes
  • Maximum number of entries: 180
  • Maximum per-entry size: 4,096 bytes

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
GHSA-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>

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-96qf

<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...

  • Resolves github/github-event-mirror-azure-function alert #71

Copilot AI changed the title [WIP] Fix unbounded memory allocation in W3C Baggage propagation Update OpenTelemetry Core to patched version Sep 3, 2026
Copilot AI requested a review from adrienpessu September 3, 2026 12:59
@adrienpessu
adrienpessu marked this pull request as ready for review September 3, 2026 13:05
Copilot AI balanced review requested due to automatic review settings September 3, 2026 13:05
@adrienpessu
adrienpessu merged commit 985f376 into main Sep 3, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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/core to 2.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.

Comment thread package.json
},
"@babel/core": "7.29.6"
"@babel/core": "7.29.6",
"@opentelemetry/core": "2.8.0"
@adrienpessu
adrienpessu deleted the copilot/resolve-opentelemetry-vulnerability branch September 3, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants