CVE-2022-46162 Discourse BBCode plugin vulnerable to arbitrary CSS injection
Attackers can inject arbitrary CSS via BBCode in Discourse, potentially leading to XSS or UI manipulation, affecting sites with the plugin enabled.
- 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-46162?
CVE-2022-46162 is a high-severity cross-site scripting vulnerability in discourse-bbcode, published on 30 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
discourse-bbcode is the official BBCode plugin for Discourse. Prior to commit 91478f5, CSS injection can occur when rendering content generated with the discourse-bccode plugin. This vulnerability only affects sites which have the discourse-bbcode plugin installed and enabled. This issue is patched in commit 91478f5. As a workaround, ensure that the Content Security Policy is enabled and monitor any posts that contain bbcode.
Which versions are affected by CVE-2022-46162?
It affects 1 product.
Products include Discourse Discourse Bbcode.
How do I fix CVE-2022-46162?
No fix has been published for CVE-2022-46162 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-46162 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-46162 exists.
Sources
Also known as GHSA-8c87-xpqv-c7mp.