What’s Vulnerable › Vulnerabilities
CVE-2022-46162: Discourse BBCode plugin vulnerable to arbitrary CSS injection
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-11-30 · updated 2026-06-17
- Weakness: CWE-74
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.
Affected products
- discourse-bbcode: before 2022-11-30 — fixed in 2022-11-30
How to fix
Upgrade to a fixed version: discourse-bbcode 2022-11-30. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/discourse-bbcode/commit/91478f5cfecdcc43cf85b997168a8ecfd0f8df90
- https://github.com/discourse/discourse-bbcode/security/advisories/GHSA-8c87-xpqv-c7mp
- https://github.com/discourse/discourse-bbcode/commit/91478f5cfecdcc43cf85b997168a8ecfd0f8df90
- https://github.com/discourse/discourse-bbcode/security/advisories/GHSA-8c87-xpqv-c7mp
Get alerted when CVE-2022-46162 or the next vulnerability affects your stack