Skip to content

fix: XSS vulnurability in Table HTML cell#41539

Open
subrata71 wants to merge 1 commit intoreleasefrom
fix/xss-in-table-widget
Open

fix: XSS vulnurability in Table HTML cell#41539
subrata71 wants to merge 1 commit intoreleasefrom
fix/xss-in-table-widget

Conversation

@subrata71
Copy link
Collaborator

@subrata71 subrata71 commented Feb 5, 2026

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes https://linear.app/appsmith/issue/V2-2922/critical-stored-xss-vulnerability-in-table-widget-allows-takeover
Fixes https://github.com/appsmithorg/appsmith/security/advisories/GHSA-5hw4-whxv-6794

Automation

/ok-to-test tags="@tag.Sanity"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/21703384270
Commit: aabd52b
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Thu, 05 Feb 2026 08:33:21 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Refactor
    • Improved HTML content handling in table widgets for enhanced parsing reliability.

@subrata71 subrata71 requested a review from a team as a code owner February 5, 2026 05:34
@subrata71 subrata71 requested review from vivek-appsmith and removed request for a team February 5, 2026 05:34
@linear
Copy link

linear bot commented Feb 5, 2026

@subrata71 subrata71 self-assigned this Feb 5, 2026
@subrata71 subrata71 added the ok-to-test Required label for CI label Feb 5, 2026
@github-actions github-actions bot added the Bug Something isn't working label Feb 5, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

Walkthrough

Two utility files in TableWidgetV2 replaced innerHTML-based DOM manipulation with DOMParser API. One file extracts HTML tag names; the other extracts text content from HTML strings. Both changes maintain existing functionality while adopting a safer parsing mechanism.

Changes

Cohort / File(s) Summary
DOMParser HTML Parsing Refactor
app/client/src/widgets/TableWidgetV2/component/cellComponents/HTMLCell/utils.tsx, app/client/src/widgets/TableWidgetV2/widget/derived.js
Replaced innerHTML DOM manipulation with DOMParser API for parsing HTML content. Tag name extraction and text content extraction both now use DOMParser instead of temporary div elements. Logic and return values remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🔐 Away with innerHTML's risky sway,
DOMParser steps in to save the day!
Safer parsing, cleaner code,
A modern API's noble road. 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive PR description includes issue references and test results, but lacks motivation, context, and dependencies details required by the template. Add brief explanation of the XSS vulnerability, why DOMParser is safer, and confirm no dependencies are needed for this fix.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: XSS vulnerability in Table HTML cell' clearly summarizes the main security fix in the changeset, addressing the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/xss-in-table-widget

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 and usage tips.

@subrata71 subrata71 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Feb 5, 2026
@subrata71
Copy link
Collaborator Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21738483119.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41539.
recreate: .

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Deploy-Preview-URL: https://ce-41539.dp.appsmith.com

@vivek-appsmith vivek-appsmith requested review from sondermanish and removed request for vivek-appsmith February 6, 2026 06:28
Copy link
Contributor

@sondermanish sondermanish left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

Bug Something isn't working ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants