Conversation
tooltip.html(d.id) and tooltip.html(d.name) assign innerHTML, and both values come straight from clusters/*.json and galaxies/*.json -- data any contributor can change via a pull request. Markup in a cluster value would be parsed and executed for every visitor to misp-galaxy.org. To be clear this is hardening, not a live bug: of 56,131 cluster values, 0 look like they contain an HTML tag and 0 contain a decodable entity. The 1,720 values with "<" or ">" are "Other (Action > Environmental > Variety)" style names and the 414 with "&" are "ATT&CK" style names; none renders wrongly today. The point is that PR review is currently the only thing preventing script execution on the published site. The tooltip shows a plain name and never needed markup. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HZGwPoa8MMfkhCw47rDLA4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLUF — The misp-galaxy.org graph tooltip renders contributor-supplied names as
innerHTMLtools/mkdocs/site/docs/01_attachements/javascripts/graph.jspasses contributor-supplied strings to d3's.html(), which assignsinnerHTML: line 120 renders a clustervalueand line 250 a galaxyname, both taken straight fromclusters/*.jsonandgalaxies/*.json, which anyone can change via a pull request..text(), so the tooltip setstextContent.Problem
The graph tooltip renders contributor-supplied strings through d3's
.html(), which assignsinnerHTML:Both come straight from
clusters/*.jsonandgalaxies/*.json, which anyone can change by opening a pull request. Any markup in a cluster value would be parsed and executed as HTML by every visitor to misp-galaxy.org.Honest scope: this is hardening, not a live bug
I checked, and there is nothing to clean up in the data today:
The 1,720 values containing
<or>are all things likeOther (Action > Environmental > Variety), and the 414 containing&areATT&CK-style names — none of which forms a tag or a decodable entity, so nothing renders wrongly right now.The point is that the only thing standing between a malicious cluster value and script execution on the published site is PR review.
.text()removes that dependency, and it is a two-character change.Fix
Use
.text()(setstextContent) instead of.html()at both tooltip sites. The tooltip displays a plain name; it has never needed markup.node --checkpasses.🤖 Generated with Claude Code