Skip to content

OCPBUGS-91728: Fix CVE-2026-12151 undici DoS via unbounded memory growth in WebSocket frames#16709

Open
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:fix/CVE-2026-12151
Open

OCPBUGS-91728: Fix CVE-2026-12151 undici DoS via unbounded memory growth in WebSocket frames#16709
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:fix/CVE-2026-12151

Conversation

@jrangelramos

@jrangelramos jrangelramos commented Jul 3, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause

undici (HTTP/1.1, HTTP/2, and WebSocket client for Node.js) versions >= 6.17.0 and < 6.26.0 are vulnerable to a denial of service attack (CVE-2026-12151). The undici WebSocket client enforces maxPayloadSize on cumulative byte count but not on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that pass validation, causing unbounded memory growth and eventual memory exhaustion.

The package is a transitive dependency in the console frontend at version 6.21.2, pulled in by cheerio.

Solution description

Add a scoped yarn resolution for undici@^6.19.5 to >=6.27.0 <7.0.0 in frontend/package.json. This bumps the 6.x consumer to the patched version (6.27.0) while staying within the same major version to avoid breaking changes. The 5.x consumer (openapi-typescript) is not affected by this CVE.

Screenshots / screen recording

N/A — dependency version bump only, no visual changes.

Test setup

No special setup required.

Test cases

  • yarn install completes without errors
  • Development build (webpack --mode=development) succeeds (986 assets, 20219 modules)
  • All websocket/k8s related unit tests pass (17 suites, 158 tests)
  • undici@5.x consumer is not affected by the resolution

Browser conformance

N/A — no runtime behavior changes beyond the security fix.

Additional info

Summary by CodeRabbit

  • Chores
    • Updated dependency constraints to pin a newer compatible version of a networking library.
    • Kept the existing URI-related version constraint unchanged.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Jul 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references Jira Issue OCPBUGS-91728, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause

undici (HTTP/1.1, HTTP/2, and WebSocket client for Node.js) versions >= 6.17.0 and < 6.26.0 are vulnerable to a denial of service attack (CVE-2026-12151). The undici WebSocket client enforces maxPayloadSize on cumulative byte count but not on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that pass validation, causing unbounded memory growth and eventual memory exhaustion.

The package is a transitive dependency in the console frontend at version 6.21.2, pulled in by cheerio.

Solution description

Add a scoped yarn resolution for undici@^6.19.5 to >=6.26.0 <7.0.0 in frontend/package.json. This bumps the 6.x consumer to the patched version (6.27.0) while staying within the same major version to avoid breaking changes. The 5.x consumer (openapi-typescript) is not affected by this CVE.

Screenshots / screen recording

N/A — dependency version bump only, no visual changes.

Test setup

No special setup required.

Test cases

  • yarn install completes without errors
  • Development build (webpack --mode=development) succeeds (986 assets, 20219 modules)
  • All websocket/k8s related unit tests pass (17 suites, 158 tests)
  • undici@5.x consumer is not affected by the resolution

Browser conformance

N/A — no runtime behavior changes beyond the security fix.

Additional info

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jul 3, 2026
@openshift-ci openshift-ci Bot requested review from TheRealJon and cajieh July 3, 2026 01:48
@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jrangelramos
Once this PR has been reviewed and has the lgtm label, please assign jhadvig for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This change adds a Yarn resolutions entry in frontend/package.json for undici@^6.19.5, constraining it to >=6.27.0 <7.0.0 while keeping the existing fast-uri entry.

Changes

Dependency Resolution Update

Layer / File(s) Summary
Add undici resolution constraint
frontend/package.json
Adds a new resolutions entry pinning undici@^6.19.5 to >=6.27.0 <7.0.0, alongside the existing fast-uri resolution.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Related PRs: None specified.

Suggested labels: dependencies

Suggested reviewers: None specified.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes dependency resolution in package.json/yarn.lock; no Ginkgo test titles were added or modified.
Test Structure And Quality ✅ Passed No Ginkgo test code was changed; the PR only updates dependency resolutions in package.json and yarn.lock, so this check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added or modified; the PR only changes frontend dependency resolution files.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only frontend package/lockfile changed; no new Ginkgo e2e tests were added, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend/package.json and frontend/yarn.lock changed; no deployment manifests, operators, or controllers were modified, so the topology check is not applicable.
Ote Binary Stdout Contract ✅ Passed Only package.json/yarn.lock changed; no main/init/TestMain/suite setup code or stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes frontend/package.json and yarn.lock; no new Ginkgo e2e tests or network-relevant test code were added.
No-Weak-Crypto ✅ Passed Only a Yarn resolution/lockfile bump to undici 6.27.0 changed; no weak-crypto, custom crypto, or secret-comparison code was added.
Container-Privileges ✅ Passed PR only changes frontend/package.json and frontend/yarn.lock; no container/K8s manifests or privilege fields were modified.
No-Sensitive-Data-In-Logs ✅ Passed PR only changes yarn resolution metadata and lockfile; no logging code or sensitive literals were added.
Title check ✅ Passed The title is Jira-prefixed, concise, and accurately describes the undici CVE security fix.
Description check ✅ Passed The description covers the required sections with root cause, solution, tests, and additional info.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jrangelramos: This pull request references Jira Issue OCPBUGS-91728, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Analysis / Root cause

undici (HTTP/1.1, HTTP/2, and WebSocket client for Node.js) versions >= 6.17.0 and < 6.26.0 are vulnerable to a denial of service attack (CVE-2026-12151). The undici WebSocket client enforces maxPayloadSize on cumulative byte count but not on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that pass validation, causing unbounded memory growth and eventual memory exhaustion.

The package is a transitive dependency in the console frontend at version 6.21.2, pulled in by cheerio.

Solution description

Add a scoped yarn resolution for undici@^6.19.5 to >=6.26.0 <7.0.0 in frontend/package.json. This bumps the 6.x consumer to the patched version (6.27.0) while staying within the same major version to avoid breaking changes. The 5.x consumer (openapi-typescript) is not affected by this CVE.

Screenshots / screen recording

N/A — dependency version bump only, no visual changes.

Test setup

No special setup required.

Test cases

  • yarn install completes without errors
  • Development build (webpack --mode=development) succeeds (986 assets, 20219 modules)
  • All websocket/k8s related unit tests pass (17 suites, 158 tests)
  • undici@5.x consumer is not affected by the resolution

Browser conformance

N/A — no runtime behavior changes beyond the security fix.

Additional info

Summary by CodeRabbit

  • Chores
  • Updated dependency constraints to pin a newer compatible version of a networking library.
  • Kept the existing URI-related version constraint unchanged.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/package.json`:
- Around line 339-340: The undici package constraint in the package manifest
still permits a vulnerable release range; update the existing undici version
specifier to raise the minimum supported version from 6.26.0 to 6.27.0 while
keeping the same upper bound. Locate the dependency entry for undici in the
package manifest and adjust the version range so installs cannot resolve to
6.26.0 or any earlier affected version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7176db29-d2e1-427f-9384-05a20699dac2

📥 Commits

Reviewing files that changed from the base of the PR and between 7707540 and 3174a3f.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • frontend/package.json

Comment thread frontend/package.json Outdated
…wth in WebSocket frames

Add scoped yarn resolution to bump undici from 6.21.2 to >=6.26.0 <7.0.0
for the 6.x consumer (cheerio). The undici WebSocket client prior to 6.26.0
is vulnerable to a denial of service where a malicious server streams many
small continuation frames causing unbounded memory growth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@jrangelramos: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants