CVE-2022-46180 Arbitrary HTML injection in discourse-mermaid-theme-component
Attackers can inject arbitrary HTML into posts via the Discourse Mermaid theme component, potentially leading to script execution or account takeover.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-46180?
CVE-2022-46180 is a medium-severity cross-site scripting vulnerability in discourse-mermaid-theme-component, published on 4 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Discourse Mermaid (discourse-mermaid-theme-component) allows users of Discourse, open-source forum software, to create graphs using the Mermaid syntax. Users of discourse-mermaid-theme-component version 1.0.0 who can create posts are able to inject arbitrary HTML on that post. The issue has been fixed on the `main` branch of the GitHub repository, with 1.1.0 named as a patched version. Admins can update the theme component through the admin UI. As a workaround, admins can temporarily disable discourse-mermaid-theme-component.
Which versions are affected by CVE-2022-46180?
It affects 1 product.
Products include Discourse Mermaid.
How do I fix CVE-2022-46180?
No fix has been published for CVE-2022-46180 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-46180 being exploited?
There is no known exploitation of CVE-2022-46180 in the wild and no public exploit code.
Sources
Also known as GHSA-8437-hgcm-p3q3.