Skip to content

RS-22478: fix stored XSS in palm tree tooltips - #63

Merged
chschan merged 3 commits into
masterfrom
RS-22478-fix-label-xss
Jun 12, 2026
Merged

RS-22478: fix stored XSS in palm tree tooltips#63
chschan merged 3 commits into
masterfrom
RS-22478-fix-label-xss

Conversation

@chschan

@chschan chschan commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

HTML-escape row/column names and label text built into tooltip content (covers both the tooltip render and its size measurement).

chschan and others added 2 commits June 12, 2026 15:25
HTML-escape row/column names and label text built into tooltip content
(covers both the tooltip render and its size measurement). Rebuilt the
inst/htmlwidgets bundle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chschan
chschan requested a review from JustinCCYap June 12, 2026 05:48
Comment thread theSrc/scripts/TipContentFactory.js Outdated
<td style="text-align:right;font-family:${fontFamily};font-size:${fontSize}px">${prefix ? escapeHtml(prefix) : ''}${value || ''}${suffix ? escapeHtml(suffix) : ''}</td>
<td style="text-align:left;font-family:${fontFamily};font-size:${fontSize}px">${escapeHtml(name)}</td>
<td style="text-align:center">
<div style="width:${barWidth}px;height:8px;background-color:${(valueEnabled) ? barColor : unselectedColor}"></div>

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.

How much validation and normalization do we do with barColor and unselectedColor? Could it be an arbitrary string (via Displayr UI)? Similarly for fontFamily.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Also looking to see if there are similar cases in rhtmlHeatmap and rhtmlDendrogram

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

LGTM

@chschan
chschan merged commit c51b253 into master Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants