CVE-2022-24734 Remote code execution in mybb

High 7.2 Published Updated

Administrators with settings management permissions can inject PHP code via the Admin CP, leading to remote code execution.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24734?

CVE-2022-24734 is a high-severity code injection vulnerability in Mybb Mybb, published on 9 Mar 2022. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

MyBB is a free and open source forum software. In affected versions the Admin CP's Settings management module does not validate setting types correctly on insertion and update, making it possible to add settings of supported type `php` with PHP code, executed on on _Change Settings_ pages. This results in a Remote Code Execution (RCE) vulnerability. The vulnerable module requires Admin CP access with the `Can manage settings?` permission. MyBB's Settings module, which allows administrators to add, edit, and delete non-default settings, stores setting data in an options code string ($options_code; mybb_settings.optionscode database column) that identifies the setting type and its options, separated by a new line character (\n). In MyBB 1.2.0, support for setting type php was added, for which the remaining part of the options code is PHP code executed on Change Settings pages (reserved for plugins and internal use). MyBB 1.8.30 resolves this issue. There are no known workarounds.

Weakness: CWE-94

Which versions are affected by CVE-2022-24734?

1 open source package ship an affected version, including mybb. It affects 1 product.

PackageAffectedFixed in
mybb BitnamiFrom 1.2.01.8.30

Products include Mybb Mybb.

How do I fix CVE-2022-24734?

Upgrade mybb to 1.8.30 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2022-24734 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24734 exists.

Public exploit code: 1 Metasploit module, 1 Exploit-DB entry and 2 proofs of concept on GitHub.

All Mybb Mybb vulnerabilities

Sources

Also known as BIT-mybb-2022-24734, GHSA-876v-gwgh-w57f.

Is CVE-2022-24734 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free