CVE-2023-46251 Visual editor persistent Cross-site Scripting (XSS) in MyBB
Attackers can execute arbitrary scripts in victims' browsers via malicious MyCode in the visual editor, potentially leading to account takeover.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-46251?
CVE-2023-46251 is a high-severity cross-site scripting vulnerability in Mybb Mybb, published on 6 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
MyBB is a free and open source forum software. Custom MyCode (BBCode) for the visual editor (_SCEditor_) doesn't escape input properly when rendering HTML, resulting in a DOM-based XSS vulnerability. This weakness can be exploited by pointing a victim to a page where the visual editor is active (e.g. as a post or Private Message) and operates on a maliciously crafted MyCode message. This may occur on pages where message content is pre-filled using a GET/POST parameter, or on reply pages where a previously saved malicious message is quoted. The impact is be mitigated when: 1. the visual editor is disabled globally (_Admin CP → Configuration → Settings → Clickable Smilies and BB Code: [Clickable MyCode Editor](https://github.com/mybb/mybb/blob/mybb_1836/install/resources/settings.xml#L2087-L2094)_ is set to _Off_), or 2. the visual editor is disabled for individual user accounts (_User CP → Your Profile → Edit Options_: _Show the MyCode formatting options on the posting pages_ checkbox is not checked). MyBB 1.8.37 resolves this issue with the commit `6dcaf0b4d`. Users are advised to upgrade. Users unable to upgrade may mitigate the impact without upgrading MyBB by changing the following setting (_Admin CP → Configuration → Settings_): - _Clickable Smilies and BB Code → [Clickable MyCode Editor](https://github.com/mybb/mybb/blob/mybb_1836/install/resources/settings.xml#L2087-L2094)_: _Off_. Similarly, individual MyBB forum users are able to disable the visual editor by diabling the account option (_User CP → Your Profile → Edit Options_) _Show the MyCode formatting options on the posting pages_.
Weakness: CWE-79
Which versions are affected by CVE-2023-46251?
1 open source package ship an affected version, including mybb. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mybb Bitnami | All versions | 1.8.37 |
Products include Mybb Mybb.
How do I fix CVE-2023-46251?
Upgrade mybb to 1.8.37 or later.
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-2023-46251 being exploited?
There is no known exploitation of CVE-2023-46251 in the wild and no public exploit code.
Other vulnerabilities in Mybb Mybb
Sources
Also known as BIT-mybb-2023-46251, GHSA-wj33-q7vj-9fr8.