Skip to content
XSS Advisory Beginner CVE-2021-32851

GHSL-2021-1047: Cross-Site Scripting (XSS) in Mind-elixir - CVE-2021-32851

The Mind-elixir library inserted the menu item name into the page as raw HTML, so a name containing markup or script would run in the viewer's browser. An attacker who could influence that name field could therefore execute script in the context of a user viewing the mind map.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

An attacker that is able to influence the field name when creating a MindElixir instance is able to supply arbitrary html or javascript code that will be rendered in the context of a user, potentially leading to XSS.

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

This issue may lead to XSS, running script in the browser of a user who views the affected menu.

What the attacker needed

Attacker can influence the menu item name; victim views the mind map

The fix

The issue was fixed by the maintainer the day after it was acknowledged.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A mind map library builds a small menu of options. It took the label for each option and dropped it straight into the page as if it were page code, rather than as plain text. That means a label written as HTML, such as an image tag with an error handler, gets treated as real page content and its script runs.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.