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

> An authenticated administrator can inject arbitrary SQL via the stop word management feature in phpMyFAQ, allowing data exfiltration or modification.

- **Severity:** High 8.5 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Sep 2026
- **Updated:** 5 Oct 2026
- **Also known as:** GHSA-rw77-vq4g-x3hp

## What is CVE-2026-56738?

CVE-2026-56738 is a high-severity SQL injection vulnerability in thorsten phpMyFAQ, published on 24 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

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.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-56738?

4 open source packages ship an affected version, including thorsten/phpmyfaq and phpmyfaq/phpmyfaq.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `thorsten/phpmyfaq` | Packagist | All versions | 4.1.6 |
| `thorsten/phpmyfaq` | Packagist | All versions | 4.1.6 |
| `phpmyfaq/phpmyfaq` | Packagist | All versions | 4.1.6 |
| `phpmyfaq/phpmyfaq` | Packagist | All versions | 4.1.6 |

## How do I fix CVE-2026-56738?

Upgrade thorsten/phpmyfaq to 4.1.6 or later.

## Is CVE-2026-56738 being exploited?

There is no known exploitation of CVE-2026-56738 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-56738 and fix it if it is affected.

What it is: CVE-2026-56738 is a high-severity SQL injection vulnerability in thorsten phpMyFAQ, published on 24 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-56738 in the wild and no public exploit code.

Affected packages and fixed versions:
- thorsten/phpmyfaq (Packagist): affected all versions; fixed in 4.1.6
- thorsten/phpmyfaq (Packagist): affected all versions; fixed in 4.1.6
- phpmyfaq/phpmyfaq (Packagist): affected all versions; fixed in 4.1.6
- phpmyfaq/phpmyfaq (Packagist): affected all versions; fixed in 4.1.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-56738/ (Markdown: https://insights.sbomify.com/CVE-2026-56738/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-56738
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-56738
- OSV: https://osv.dev/vulnerability/CVE-2026-56738

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-56738/
Summaries are generated and may contain mistakes; the official description above is the record.
