Unsanitized Inner HTML in Chip component #1091
Labels
Bug 🐛
Something isn't working
P3 Triaged
Issue has been reviewed as part of legacy backlog grooming (project P3).
Question ❓
Further information is requested
Triaged: v4
Triaged, to be implemented as part of Vanilla v4
I noticed when reviewing the TICS report for react-components that there are some uses of
dangerouslySetInnerHTML
that were flagged as XSS vulnerabilities.Flag 1: Chip (src)
Flag 2: FilterPanelSection of Search and Filter (src)
Are these left here intentionally so that our users have the freedom to place whatever they like in the chips, and thus they have the responsibility to sanitize contents? Otherwise, we could use something like dompurify to sanitize the inner HTML, i.e:
Here's what a change to fix this might look like: jmuzina@f3371c6
The text was updated successfully, but these errors were encountered: