cbcvebase.
CVE-2022-24734
published 2022-03-09

CVE-2022-24734: 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…

PriorityP268high7.2CVSS 3.1
AVNACLPRHUINSUCHIHAH
EXPLOIT
EPSS
77.68%
99.5th percentile
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.

Affected

2 ranges
VendorProductVersion rangeFixed in
mybbmybb
mybbmybb>= 1.2.0 < 1.8.301.8.30

Detection & IOCsextracted from sources · hover to see the quote

url/admin/index.php?module=config-settings&action=add
url/admin/index.php?module=config-settings&action=change
commandtype=\tphp
command" . system('{cmd} | base64 -w 0') ."
command" . system('{raw_cmd}') ."
  • Detect POST requests to the MyBB Admin CP settings add endpoint containing a 'type' field value of '\tphp' (tab-prefixed 'php'), which bypasses type validation to inject executable PHP code.
  • Monitor for HTTP POST requests to '/admin/index.php?module=config-settings&action=add' followed shortly by a GET to '/admin/index.php?module=config-settings&action=change' from the same session — this two-request pattern is the exploit's inject-then-trigger sequence.
  • Alert on the presence of PHP system() call syntax (e.g., '" . system(' ) in the 'extra' or 'optionscode' fields of MyBB settings POST bodies, indicating code injection into the options code string.
  • Look for the HTML element 'row_setting_<random_string>' appearing in the Change Settings page response, which is used by the exploit to retrieve command output from the injected PHP setting.
  • The exploit requires an authenticated Admin CP session with 'Can manage settings?' permission; correlate Admin CP login events with subsequent settings add/change actions as a behavioral detection signal.
  • After exploitation, the Metasploit module cleans up by deleting the injected setting; monitor for rapid add-then-delete cycles on MyBB settings as a post-exploitation indicator.
  • ·Exploitation requires an authenticated Admin CP account; this is not an unauthenticated vulnerability. Detection should focus on privileged admin sessions, not anonymous traffic.
  • ·There are no known workarounds for this vulnerability; patching to 1.8.30 is the only remediation.

CVSS provenance

nvdv3.17.2HIGHCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
nvdv2.06.5MEDIUMAV:N/AC:L/Au:S/C:P/I:P/A:P
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.