# phpMyFAQ has SQL Injection in CurrentUser::setTokenData through unescaped OAuth token fields

Advisory record · `GHSA-pm8c-3qq3-72w7`

- **Identifiers:** `GHSA-pm8c-3qq3-72w7` · `CVE-2026-46359` · `PKSA-n87n-9t5q-zcf5` · `PKSA-r4gq-dd3d-gxrj`
- **State:** Confirmed
- **Severity:** CVSS 7.7 High
- **Critical:** No
- **Weakness (CWE):** [CWE-89](https://cwe.mitre.org/data/definitions/89.html)
- **Tags:** [SQL injection](https://agentprime.io/advisories/tag/sql-injection.md)
- **Published:** 6 May 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 6 May 2026, 20:44 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `thorsten/phpmyfaq` (Packagist): affected `<4.1.2`; fixed in `4.1.2`
- `phpmyfaq/phpmyfaq` (Packagist): affected `<4.1.2`; fixed in `4.1.2`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> SQL injection in phpMyFAQ's CurrentUser::setTokenData(), which builds an UPDATE statement from OAuth token fields without escaping them. The affected packages are thorsten/phpmyfaq and phpmyfaq/phpmyfaq before 4.1.2, and the fix is in 4.1.2. An attacker who can log in through Azure AD authentication with a crafted claim, such as a display name containing SQL metacharacters, can run arbitrary SQL against the database, which the source says could expose FAQ data and user credentials. Upgrade to 4.1.2 or later.

Written 31 Oct 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.7 High, CVSS 4.0: `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`, from CNA (VulnCheck)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0026, the 18th percentile, on 15 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 15 May 2026, 18:36 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2026-46359)
- 31 Oct 2026, 13:58 UTC: First seen by agentprime
- 31 Oct 2026, 13:58 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-pm8c-3qq3-72w7)

## Sources

- [GitHub Advisory Database: GHSA-pm8c-3qq3-72w7](https://github.com/advisories/GHSA-pm8c-3qq3-72w7)
- [OSV: GHSA-pm8c-3qq3-72w7](https://osv.dev/vulnerability/GHSA-pm8c-3qq3-72w7)
- <https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-pm8c-3qq3-72w7>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-46359>
- <https://github.com/thorsten/phpMyFAQ>
- <https://www.vulncheck.com/advisories/phpmyfaq-sql-injection-in-currentuser-settokendata-via-unescaped-oauth-token-fields>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-pm8c-3qq3-72w7>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-pm8c-3qq3-72w7/>. Everything for agents: <https://agentprime.io/llms.txt>.
