概要
認証なしで、検索機能からデータベースを読み書きされ、管理者権限を得られる。
元の説明(英語)を読む
An unauthenticated SQL injection can occur on the front end of any site that uses craft.search to perform a search, allowing stacked query execution and enabling escalation to an administrator. Note that this only affects MySQL/MariaDB. Impact * SQL injection — The attribute parameter is concatenated into the query unsanitized, and because PDO runs with emulated prepares, stacked statements execute. This gives unauthenticated read and write access to the application database. * Privilege escalation to administrator — The write primitive was used to set the admin flag on user ID 1 in the users table, confirmed by reading the value back. Craft short-circuits its permission checks on this single column, so no further changes were needed. The same primitive can overwrite any account’s password hash. Update to the patched versions (4.18.9 and 5.11.2) to get the fix. If you cannot update immediately, you can block front-end requests with %5Battribute%5D and [attribute] anywhere in the query string as a temporary mitigation.
影響を受ける人
craft.search を使う MySQL/MariaDB 上の Craft CMS の管理者
対策
- Craft CMS を 4.18.9 または 5.11.2 以降に更新する
- 暫定策として、クエリ文字列に %5Battribute%5D や [attribute] を含む要求を遮断する
国内の動き
本文に同じ CVE 番号のある国内の注意喚起・報道は、まだ無い。
海外の動き
本文に同じ CVE 番号のある海外の注意喚起・報道は、まだ無い。
PoC
リンクだけを載せる。中身は確かめていない。