A MyBB web forum engine has revealed several vulnerabilities that, when combined, allow for the execution of PHP code on the server. The issues are present in versions 1.8.16 to 1.8.25 and have been fixed in the MyBB 1.8.26 update.
Az első sebezhetőség (CVE-2021-27889) lehetővé teszi, hogy egy nemprivilegizált fórumbejegyző JavaScript-kódot ágyazzon be a bejegyzésekbe, beszélgetésekbe és privát üzenetekbe. A fórum lehetővé teszi képek, listák és multimédiás tartalmak hozzáadását speciális címkék segítségével, amelyek HTML-kódra alakítódnak. A címkék átalakításában hibás kód miatt az alábbi képlet, amely duplázott URL-t tartalmaz: [img]http://xyzsomething.com/image?)http://x.com/onerror=alert(1);//[/img] az alábbi módon alakul. <img src="»http://xyzsomething.com/image?)<a" href="»" http:="»»" x.com="»»" onerror="»alert(1);//"»" target="»_blank»" rel="»noopener»" class="»mycode_url»">
The second vulnerability (CVE-2021-27890) allows for SQL command injection, enabling the execution of arbitrary code. This issue arises from substituting $theme[‘templateset’] into the SQL query without proper sanitization and executing components ${…} via eval. For example, it is possible to launch a PHP command passthru(‘ls’) while processing a theme with the following structure: <templateset>’) AND 1=0 UNION SELECT title, ‘${passthru(\’ls\’)}’ from mybb_templates — <\/templateset>
To exploit the second vulnerability, an administrator session of the forum must be used. An attacker can leverage the first vulnerability to send a private message with JavaScript code to the administrator, which, when viewed, will exploit the second vulnerability.
Forrás: opennet.ru
