Skip to content

OCPBUGS-92088: Fix CVE-2026-44990 sanitize-html stored XSS via HTML sanitizer bypass#16707

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

OCPBUGS-92088: Fix CVE-2026-44990 sanitize-html stored XSS via HTML sanitizer bypass#16707
jrangelramos wants to merge 1 commit into
openshift:mainfrom
jrangelramos:fix/CVE-2026-44990

Conversation

@jrangelramos

@jrangelramos jrangelramos commented Jul 2, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause

sanitize-html versions prior to 2.17.4 can turn attacker-controlled content inside a disallowed xmp element into live HTML or JavaScript (CVE-2026-44990). This is a sanitizer bypass in the default disallowedTagsMode: 'discard' path and can lead to stored XSS in applications that render sanitized output back to users.

The package is a direct dependency of the console frontend at version 2.3.2.

Solution description

Bump sanitize-html from 2.3.2 to 2.17.5 in frontend/package.json. Version 2.17.4 patches the vulnerability; 2.17.5 is the latest 2.x release.

The only source-code consumer is MarkdownView.tsx, which uses the standard sanitizeHtml() API — no breaking changes in this major-version-compatible bump.

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
  • MarkdownView unit tests pass (9/9)
  • No other test files reference sanitize-html

Browser conformance

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

Additional info

Summary by CodeRabbit

  • Chores
    • Updated a third-party HTML sanitization library to a newer version, which may improve reliability and security in content handling.

@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 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

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

sanitize-html versions prior to 2.17.4 can turn attacker-controlled content inside a disallowed xmp element into live HTML or JavaScript (CVE-2026-44990). This is a sanitizer bypass in the default disallowedTagsMode: 'discard' path and can lead to stored XSS in applications that render sanitized output back to users.

The package is a direct dependency of the console frontend at version 2.3.2.

Solution description

Bump sanitize-html from 2.3.2 to 2.17.5 in frontend/package.json. Version 2.17.4 patches the vulnerability; 2.17.5 is the latest 2.x release.

The only source-code consumer is MarkdownView.tsx, which uses the standard sanitizeHtml() API — no breaking changes in this major-version-compatible bump.

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
  • MarkdownView unit tests pass (9/9)
  • No other test files reference sanitize-html

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 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The sanitize-html dependency in frontend/package.json was updated from version ^2.3.2 to ^2.17.4. No other files, scripts, or configurations were modified.

Changes

Dependency Update

Layer / File(s) Summary
Update sanitize-html version
frontend/package.json
Bumped the sanitize-html dependency version from ^2.3.2 to ^2.17.4.

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

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Jira issue and the security fix for sanitize-html.
Description check ✅ Passed The description fills all required template sections and provides root cause, fix, testing, and supporting details.
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 Only frontend/package.json and yarn.lock changed for sanitize-html; no Ginkgo tests or titles were added or modified.
Test Structure And Quality ✅ Passed No Ginkgo specs were changed; the only Go test file is a standard testing helper, and the new frontend tests are Cypress/Jest.
Microshift Test Compatibility ✅ Passed No new Ginkgo tests or OpenShift API usages were added; only frontend dependency files changed.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only frontend/package.json and yarn.lock changed; no new Ginkgo e2e tests or multi-node assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only frontend/package.json and yarn.lock changed; no deployment manifests, controllers, or scheduling constraints were added or modified.
Ote Binary Stdout Contract ✅ Passed PR only updates sanitize-html in package.json and yarn.lock; no process-level code or stdout-writing entrypoints were changed.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; this PR only bumps sanitize-html in package.json and yarn.lock.
No-Weak-Crypto ✅ Passed Diff only bumps sanitize-html and lockfile; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom crypto changes appear.
Container-Privileges ✅ Passed PR only updates sanitize-html in frontend/package.json and yarn.lock; no container/K8s manifests or privilege settings were changed.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The PR only bumps sanitize-html in frontend/package.json and yarn.lock; no logging statements or sensitive-data handling changes were introduced.
✨ 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 openshift-ci Bot requested review from sg00dwin and spadgett July 2, 2026 19:48
@openshift-ci

openshift-ci Bot commented Jul 2, 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 cajieh 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

…anitizer bypass

Bump sanitize-html from 2.3.2 to 2.17.5 to fix a stored cross-site
scripting vulnerability where attacker-controlled content inside a
disallowed xmp element can be turned into live HTML or JavaScript under
the default discard mode. Version 2.17.4 patches the issue.

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

Copy link
Copy Markdown
Contributor

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

sanitize-html versions prior to 2.17.4 can turn attacker-controlled content inside a disallowed xmp element into live HTML or JavaScript (CVE-2026-44990). This is a sanitizer bypass in the default disallowedTagsMode: 'discard' path and can lead to stored XSS in applications that render sanitized output back to users.

The package is a direct dependency of the console frontend at version 2.3.2.

Solution description

Bump sanitize-html from 2.3.2 to 2.17.5 in frontend/package.json. Version 2.17.4 patches the vulnerability; 2.17.5 is the latest 2.x release.

The only source-code consumer is MarkdownView.tsx, which uses the standard sanitizeHtml() API — no breaking changes in this major-version-compatible bump.

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
  • MarkdownView unit tests pass (9/9)
  • No other test files reference sanitize-html

Browser conformance

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

Additional info

Summary by CodeRabbit

  • Chores
  • Updated a third-party HTML sanitization library to a newer version, which may improve reliability and security in content handling.

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.

🧹 Nitpick comments (1)
frontend/package.json (1)

222-222: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Consider pinning an exact version instead of a caret range.

The ^2.17.4 range permits automatic minor/patch updates within 2.x, which could pull in unvetted future releases without an explicit review. As per path instructions for package*.json files, "Pin exact versions; verify hashes where supported."

♻️ Proposed fix
-    "sanitize-html": "^2.17.4",
+    "sanitize-html": "2.17.4",
🤖 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 222, The package.json dependency entry for
sanitize-html is using a caret range, which should be pinned to an exact version
per the package*.json policy. Update the sanitize-html declaration in the
frontend package manifest to a fixed release version instead of ^2.17.4, and
keep this dependency aligned with any lockfile or hash verification used in the
project.

Source: Path instructions

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

Nitpick comments:
In `@frontend/package.json`:
- Line 222: The package.json dependency entry for sanitize-html is using a caret
range, which should be pinned to an exact version per the package*.json policy.
Update the sanitize-html declaration in the frontend package manifest to a fixed
release version instead of ^2.17.4, and keep this dependency aligned with any
lockfile or hash verification used in the project.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 75f955b2-7eaa-4233-a848-7f52a7d6acfc

📥 Commits

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

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

@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