# phpMyFAQ has SQL Injection in `StopWords::add()` — Unescaped Stop Word Insertion

High severity, published 2026-09-24. Update phpmyfaq/phpmyfaq to 4.1.6 or later and thorsten/phpmyfaq to 4.1.6 or later: composer update phpmyfaq/phpmyfaq thorsten/phpmyfaq.

Canonical URL: https://buzzphp.com/security/ghsa-rw77-vq4g-x3hp · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-09-24 |
| Updated | 2026-09-24 |
| CVE | [CVE-2026-56738](https://nvd.nist.gov/vuln/detail/CVE-2026-56738) |
| GHSA | [GHSA-rw77-vq4g-x3hp](https://github.com/advisories/GHSA-rw77-vq4g-x3hp) |
| Weakness | CWE-89 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| phpmyfaq/phpmyfaq | <= 4.1.5 | 4.1.6 |
| thorsten/phpmyfaq | <= 4.1.5 | 4.1.6 |

## What to do

Update phpmyfaq/phpmyfaq to 4.1.6 or later and thorsten/phpmyfaq to 4.1.6 or later: composer update phpmyfaq/phpmyfaq thorsten/phpmyfaq.

Check which version you run with `composer show phpmyfaq/phpmyfaq`, and every affected package with `composer audit`.

## About this advisory

Summary

The StopWords::add() method in phpMyFAQ 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.



## Links

- [GHSA-rw77-vq4g-x3hp on GitHub](https://github.com/advisories/GHSA-rw77-vq4g-x3hp)
- [CVE-2026-56738 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-56738)
- [All Composer security advisories](https://buzzphp.com/security)
