Exploit database

Vulnerability

CVE-2022-24734

Remote code execution in mybb

Vulnerability details

Score
7.2
Severity
high

CVSS 3.1 · GitHub_M

Vector string

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

4 sources
MyBB Admin Control Code Injection RCE
MSF-multi--http--mybb_rce_cve_2022_24734MetasploitLinux,PHP,Unix,Windows / remote

This exploit module leverages an improper input validation vulnerability in MyBB prior to `1.8.30` to execute arbitrary code in the context of the user running the application. MyBB Admin Control setting page calls PHP `eval` function with an unsanitized user input. The exploit adds a new setting, injecting the payload in the vulnerable field, and triggers its execution with a second request. Finally, it takes care of cleaning up and removes the setting. Note that authentication is required for this exploit to work and the account must have rights to add or update settings (typically, myBB administrator role).

2022-03-09mybb_rce_cve_2022_24734.rb
altelus1/cve-2022-24734
GH-8a1f33ceded64467337b9228c1b8da15GitHubUnofficial GitHub source

CVE-2022-24734 PoC

2022-05-083 files · 48 stars
lavclash75/mybb-cve-2022-24734
GH-a72f94e41bf26a5f9acfd40e3ff02b68GitHubUnofficial GitHub source

MyBB 1.8.29 - Remote Code Execution

2022-05-154 files · 1 stars