phpMyFAQ has SQL Injection in `StopWords::add()` — Unescaped Stop Word Insertion
thorsten phpMyFAQ
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| phpmyfaq/phpmyfaq Packagist |
|
|
| thorsten/phpmyfaq Packagist |
|
|
thorsten phpMyFAQ
| Product | Affected | Fixed in |
|---|---|---|
| phpmyfaq/phpmyfaq Packagist |
|
|
| thorsten/phpmyfaq Packagist |
|
|
phpMyFAQ is an open source FAQ web application. The `StopWords::add()` method inversions prior to 4.1.6 builds a SQL `INSERT` statement using `sprintf()` and inserts the user-supplied stop word value directly into the query string without calling the application's database escaping function on it. A sibling method, `StopWords::update()`, which modifies an existing stop word, correctly escapes the same kind of input. The omission is isolated to the `add()` (insert) code path. An authenticated administrator who can reach the stop-word management feature can submit a crafted value as the "word" parameter that breaks out of the SQL string literal and injects arbitrary SQL, including statements to drop tables, exfiltrate data, or modify other rows in the database. Version 4.1.6 fixes the issue.
From the CVE record · GitHub_M
Before version 4.1.6, phpMyFAQ inserts a user-supplied stop word into a SQL query without escaping it. An authenticated administrator with access to stop-word management can submit a crafted word to execute arbitrary SQL, potentially exposing or changing data or dropping tables.
Teams running Packagist packages phpmyfaq/phpmyfaq or thorsten/phpmyfaq at versions before 4.1.6 should check their installations.