Skip to content

OCPBUGS-99040: Fix CVE-2026-49978 - bump DOMPurify to >= 3.4.7#16810

Open
germanparente wants to merge 1 commit into
openshift:mainfrom
germanparente:fix-CVE-2026-49978-main
Open

OCPBUGS-99040: Fix CVE-2026-49978 - bump DOMPurify to >= 3.4.7#16810
germanparente wants to merge 1 commit into
openshift:mainfrom
germanparente:fix-CVE-2026-49978-main

Conversation

@germanparente

@germanparente germanparente commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description of the Change

CVE-2026-49978: DOMPurify IN_PLACE sanitization bypass via attached Shadow Root inside <template>.content (XSS). Affects DOMPurify versions <= 3.4.6.

Console has DOMPurify 3.4.3 as a transitive dependency via monaco-editor. This adds a dompurify yarn resolution to bump it to ^3.4.11 (resolved to 3.4.12).

Jira

OCPBUGS-99040

Screenshots / Screen Recordings

N/A - dependency version bump only, no UI changes.

Testing

  • Verified yarn.lock resolves dompurify to 3.4.12 (above fix version 3.4.7).

Summary by CodeRabbit

  • Bug Fixes
    • Updated the content sanitization component to version 3.4.11 for improved security and reliability.

Add dompurify resolution to bump transitive dependency from 3.4.3 to
^3.4.11, fixing DOMPurify IN_PLACE sanitization bypass via attached
Shadow Root inside <template>.content (XSS).

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

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@germanparente: This pull request references Jira Issue OCPBUGS-99040, 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:

Description of the Change

CVE-2026-49978: DOMPurify IN_PLACE sanitization bypass via attached Shadow Root inside <template>.content (XSS). Affects DOMPurify versions <= 3.4.6.

Console has DOMPurify 3.4.3 as a transitive dependency via monaco-editor. This adds a dompurify yarn resolution to bump it to ^3.4.11 (resolved to 3.4.12).

Jira

OCPBUGS-99040

Screenshots / Screen Recordings

N/A - dependency version bump only, no UI changes.

Testing

  • Verified yarn.lock resolves dompurify to 3.4.12 (above fix version 3.4.7).

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 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The frontend package resolutions add dompurify at version ^3.4.11; the existing protobufjs resolution remains unchanged.

Changes

Dependency Resolution

Layer / File(s) Summary
DOMPurify resolution update
frontend/package.json
Adds the dompurify resolution at ^3.4.11 while retaining protobufjs at 7.5.8.

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

Suggested reviewers: logonoff, rhamilto, vojtechszocs

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and testing, but it omits several required template sections like root cause, solution details, test setup, cases, conformance, and reviewers. Add the missing template sections: root cause, solution description, test setup, test cases, browser conformance, additional info, and reviewers/assignees.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title is Jira-prefixed, specific, and accurately summarizes the DOMPurify security bump.
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 bumps DOMPurify in frontend/package.json and frontend/yarn.lock; no test files or Ginkgo test titles were added or modified.
Test Structure And Quality ✅ Passed PR only bumps dompurify in frontend/package.json and yarn.lock; it doesn't modify any Ginkgo test code, so this check is not applicable.
Microshift Test Compatibility ✅ Passed Only frontend/package.json and yarn.lock changed; no Ginkgo tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes frontend/package.json and frontend/yarn.lock for a dependency bump; no new or modified Ginkgo e2e tests were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend/package.json and frontend/yarn.lock changed for a DOMPurify dependency bump; no deployment manifests, controllers, or scheduling constraints were modified.
Ote Binary Stdout Contract ✅ Passed PR only updates frontend/package.json and yarn.lock for dompurify; no process-level code or stdout writes were changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only frontend/package.json and yarn.lock changed; no new Ginkgo e2e tests or network-sensitive code were added.
No-Weak-Crypto ✅ Passed Only a dompurify resolution/lockfile bump changed; no weak crypto, custom crypto, or secret-compare code was added.
Container-Privileges ✅ Passed PR only bumps dompurify in frontend/package.json and yarn.lock; no container/K8s manifest privilege fields were added or changed.
No-Sensitive-Data-In-Logs ✅ Passed Only dependency-resolution changes in package.json/yarn.lock; no code or logging statements were added, and the patch scan found no sensitive-data terms.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from TheRealJon and jhadvig July 23, 2026 15:58
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: germanparente
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

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@germanparente: This pull request references Jira Issue OCPBUGS-99040, 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:

Description of the Change

CVE-2026-49978: DOMPurify IN_PLACE sanitization bypass via attached Shadow Root inside <template>.content (XSS). Affects DOMPurify versions <= 3.4.6.

Console has DOMPurify 3.4.3 as a transitive dependency via monaco-editor. This adds a dompurify yarn resolution to bump it to ^3.4.11 (resolved to 3.4.12).

Jira

OCPBUGS-99040

Screenshots / Screen Recordings

N/A - dependency version bump only, no UI changes.

Testing

  • Verified yarn.lock resolves dompurify to 3.4.12 (above fix version 3.4.7).

Summary by CodeRabbit

  • Bug Fixes
  • Updated the content sanitization component to version 3.4.11 for improved security and reliability.

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`:
- Line 228: Update the dompurify dependency declaration in package.json from the
caret range to the exact fixed release 3.4.12, preventing future 3.x updates
when the lockfile is refreshed.
🪄 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: ba847423-35cc-463d-a67f-b8b68116408e

📥 Commits

Reviewing files that changed from the base of the PR and between 38882a3 and 114b425.

⛔ 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
"hosted-git-info": "^3.0.8",
"protobufjs": "7.5.8"
"protobufjs": "7.5.8",
"dompurify": "^3.4.11"

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n '"dompurify"|dompurify@' frontend/package.json frontend/yarn.lock yarn.lock 2>/dev/null || true

curl -sS -X POST https://api.osv.dev/v1/query \
  -H 'Content-Type: application/json' \
  -d '{"package":{"name":"dompurify","ecosystem":"npm"},"version":"3.4.12"}' |
  jq '.vulns // []'

Repository: openshift/console

Length of output: 321


Pin dompurify to the fixed release.

package.json still allows future 3.x updates via ^3.4.11; use the exact 3.4.12 release so the security fix doesn’t drift when the lockfile is refreshed.

Proposed fix
-    "dompurify": "^3.4.11"
+    "dompurify": "3.4.12"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"dompurify": "^3.4.11"
"dompurify": "3.4.12"
🤖 Prompt for 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.

In `@frontend/package.json` at line 228, Update the dompurify dependency
declaration in package.json from the caret range to the exact fixed release
3.4.12, preventing future 3.x updates when the lockfile is refreshed.

Source: Path instructions

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@germanparente: 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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2026
@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

PR needs rebase.

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.

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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants