Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. thorsten/phpmyfaq
  4. ›
  5. GHSA-pm8c-3qq3-72w7

GHSA-pm8c-3qq3-72w7: phpMyFAQ has SQL Injection in CurrentUser::setTokenData through unescaped OAuth token fields

May 6, 2026 (updated June 9, 2026)

CurrentUser::setTokenData() in phpmyfaq/src/phpMyFAQ/User/CurrentUser.php at lines 515-534 builds a SQL UPDATE statement with sprintf and interpolates OAuth token fields (refresh_token, access_token, code_verifier, and json_encode($token['jwt'])) without calling $db->escape(). Sibling methods setAuthSource() and setRememberMe() in the same file do call $db->escape() on user-controlled values, so the omission is local to this method. An attacker (Bob) whose Azure AD display name contains a single quote (for example O'Brien, or a deliberate SQL payload) breaks out of the string literal and injects arbitrary SQL against the phpMyFAQ database.

References

  • github.com/advisories/GHSA-pm8c-3qq3-72w7
  • github.com/thorsten/phpMyFAQ/security/advisories/GHSA-pm8c-3qq3-72w7
  • nvd.nist.gov/vuln/detail/CVE-2026-46359
  • www.vulncheck.com/advisories/phpmyfaq-sql-injection-in-currentuser-settokendata-via-unescaped-oauth-token-fields

Code Behaviors & Features

Detect and mitigate GHSA-pm8c-3qq3-72w7 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.1.2

Fixed versions

  • 4.1.2

Solution

Upgrade to version 4.1.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

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

Source file

packagist/thorsten/phpmyfaq/GHSA-pm8c-3qq3-72w7.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:52 +0000.