Skip to content

fix: xss vulnerabilities - #2603

Open
mburri wants to merge 4 commits into
mainfrom
fix/security-issues
Open

mburri wants to merge 4 commits into
mainfrom
fix/security-issues

Conversation

@mburri

@mburri mburri commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

fixes some possible xxs vulnerabilties

see https://gitlab.lindas.admin.ch/bafu/bafu-visualize/visualize/-/work_items/787 for more details and how to reproduce

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
visualization-tool Ready Ready Preview Sep 18, 2026 3:53pm UTC

Request Review

}}
dangerouslySetInnerHTML={{ __html: layer.description }}
/>
<CustomLayerDescription description={layer.description} />

@hupf hupf Sep 15, 2026

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.

@mburri That fixes the XSS issue, but it also breaks every formatting markup. Shouldn't we sanitize the description instead, like we did in other places? Or was there a decision, that no formatting is allowed here?

If formatting should still work, I'd introduce a sanitizing component, maybe leveraging the already present sanitizeSchema/rehypeSanitize? Otherwise DOMPurify would be the goto IMO.

Also, I assume there is another XSS in app/rdf/query-search.ts with the highlightedTitle and highlightedDescription.

@hupf hupf mentioned this pull request Sep 18, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants