Skip to main content

phpMyFAQ EUVDEUVD-2026-30594

| CVE-2026-46359 HIGH
SQL Injection (CWE-89)
7.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify phpMyFAQ <4.1.2 with Azure AD SSO enabled
  2. Delivery
    Register Entra ID account with SQL payload in display name or JWT claim
  3. Exploit
    Initiate OAuth login to phpMyFAQ
  4. Install
    IdP returns id_token containing malicious claim
  5. C2
    setTokenData() interpolates claim into unescaped UPDATE
  6. Execute
    Injected SQL executes against faquser table
  7. Impact
    Escalate privileges or exfiltrate FAQ database

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The target phpMyFAQ instance (version < 4.1.2) must have Microsoft Azure AD / Entra ID OAuth authentication enabled and reachable, because CurrentUser::setTokenData() is only invoked along that SSO code path; instances using only local accounts or non-Azure auth providers are not exposed. The attacker must control or register an Entra ID account that is permitted to authenticate against the target's app registration and must place SQL metacharacters (notably a single quote) into a field that flows into the OAuth token - specifically the Azure AD display name, the preferred_username claim, or another JWT claim embedded in id_token - and then complete a successful OAuth login (UI:P passive interaction). No privileges within phpMyFAQ are required pre-exploitation (PR:N), and no application-layer escaping is bypassed beyond the missing $db->escape() call, but high attack complexity (AC:H) reflects the need to control IdP-side claims and the dependency on the Azure AD tenant configuration accepting the attacker's account.

Impact

Signals are mixed and warrant context-aware prioritization rather than blanket urgency. The CVSS 4.0 score of 7.7 reflects network attack vector but high attack complexity (AC:H), required attack prerequisites (AT:P), passive user interaction (UI:P), and high confidentiality/integrity/availability impact (VC:H/VI:H/VA:H) - consistent with SSVC's 'Total' technical impact but 'Automatable: no' classification. EPSS is very low (0.03% / 9th percentile), and the CVE is not listed in CISA KEV, indicating no observed mass exploitation. However, SSVC marks exploitation status as 'poc' and a detailed advisory plus working proof-of-concept methodology is published by VulnCheck and the upstream GHSA, so targeted attacks against phpMyFAQ instances with Azure AD enabled are plausible. The CVSS vector indicates PR:N (no privileges required at the SQL layer), but the description and code path show that exploitation requires a usable Azure AD account that authenticates into the target phpMyFAQ instance - a meaningful gating factor not visible from the vector alone. Defenders running phpMyFAQ with Azure AD SSO should treat this as a high-priority patch; deployments using local accounts only are not reachable through this path.

Exploit ScenarioDerived

An attacker registers (or controls) a Microsoft Entra ID account whose display name or a custom JWT claim such as preferred_username contains an SQL payload like O'; UPDATE faquser SET is_admin=1 WHERE user_id=1-- . They then log in to a target phpMyFAQ instance that has Azure AD SSO enabled; the legitimate OAuth token exchange returns an id_token containing the attacker-controlled claim. When phpMyFAQ calls CurrentUser::setTokenData() to persist the tokens, the unescaped single quote breaks out of the SQL string literal and the appended payload executes against the phpMyFAQ database. A working proof-of-concept methodology is published in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – May 28, 2026

SQL injection in phpMyFAQ prior to 4.1.2 allows attackers authenticating through Azure AD/Entra ID OAuth to execute arbitrary database queries by embedding SQL metacharacters in their identity provider display name or JWT claims. The CurrentUser::setTokenData() method interpolates OAuth token fields into an UPDATE statement via sprintf without calling the database escape routine, while sibling methods in the same file correctly escape input. Publicly available exploit code exists per VulnCheck and the GHSA advisory, though EPSS is low (0.03%, 9th percentile) and the issue is not in CISA KEV.

Earlier versions of this analysis (2)
v2 May 28, 2026 - 16:41 cvss changed CVSS 7.7

SQL injection in phpMyFAQ versions prior to 4.1.2 allows attackers controlling Azure AD/Entra ID identity attributes to execute arbitrary database queries against the faquser table by smuggling SQL metacharacters through OAuth token claims (display name, preferred_username, JWT fields). Publicly available exploit code exists via the VulnCheck and GHSA advisories, though the EPSS score of 0.03% (9th percentile) and SSVC rating of non-automatable suggest limited mass-exploitation today. The bug is a developer oversight: CurrentUser::setTokenData omits the $db->escape() call that adjacent methods setAuthSource and setRememberMe correctly use.

v1 May 15, 2026 - 19:32 CVSS 7.5

SQL injection in phpMyFAQ 4.1.1 and earlier allows attackers with Azure AD accounts to execute arbitrary database queries through OAuth token claims. The CurrentUser::setTokenData() method fails to escape JWT token fields when building SQL UPDATE statements, enabling injection when display names or JWT claims contain SQL metacharacters like single quotes. The vulnerability requires user interaction (OAuth login) but no special privileges, making it exploitable by any user who can authenticate via Azure AD.

RemediationAI

Vendor-released patch: upgrade phpMyFAQ to 4.1.2 or later, which adds proper $db->escape() handling in CurrentUser::setTokenData() consistent with setAuthSource() and setRememberMe(); see https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-pm8c-3qq3-72w7 and the VulnCheck advisory at https://www.vulncheck.com/advisories/phpmyfaq-sql-injection-in-currentuser-settokendata-via-unescaped-oauth-token-fields for details. If patching cannot be performed immediately, disable the Azure AD / Entra ID OAuth login provider in the phpMyFAQ configuration to eliminate the reachable code path - this prevents single sign-on with Microsoft accounts and forces users to local authentication. As a tighter compensating control on the identity side, restrict the Entra ID app registration assignment to a trusted, vetted user group whose display names and custom claims you control and audit, accepting that this only narrows rather than removes the risk. As a final defensive layer, place the phpMyFAQ database account behind least-privilege grants (UPDATE on faquser only) and enable database query logging on the faquser table to detect anomalous statements while the patch is rolled out.

Affected VersionsENISA

phpMyFAQ 0 <4.1.2
phpMyFAQ 0 <4.1.2

Affected Packages

composer phpmyfaq/phpmyfaq fix: 4.1.2
composer thorsten/phpmyfaq fix: 4.1.2
euvd phpmyfaq fix: 4.1.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

phpMyFAQ is an open-source PHP-based FAQ management system (CPE cpe:2.3:a:thorsten:phpmyfaq) that supports Microsoft Azure AD / Entra ID OAuth single sign-on. The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). In phpmyfaq/src/phpMyFAQ/User/CurrentUser.php lines 515-534, the setTokenData() method builds a SQL UPDATE against the faquser table by interpolating refresh_token, access_token, code_verifier, and json_encode($token['jwt']) directly into single-quoted string literals via sprintf, omitting the $db->escape() call that sibling methods setAuthSource() and setRememberMe() correctly use. Crucially, json_encode() does not escape single quotes, so a JWT claim such as preferred_username='O'Malley' survives encoding and terminates the SQL string literal, allowing arbitrary SQL to be appended.

Know when Phpmyfaq gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 7.7 HIGH
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

Primary rating from Vendor (VulnCheck) · only source for this CVE.

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Analysis Updated
May 28, 2026 - 16:42 vuln.today
v3 - CVSS changed
Analysis Updated
May 28, 2026 - 16:41 vuln.today
v2 - CVSS changed
CVSS changed
May 28, 2026 - 16:22 NVD
7.5 (HIGH) 7.7 (HIGH)
Patch available
May 15, 2026 - 20:02 EUVD

DescriptionCVE.org

phpMyFAQ before 4.1.2 contains a sql injection vulnerability in CurrentUser::setTokenData that allows authenticated attackers to execute arbitrary SQL by injecting malicious OAuth token claims. Attackers with Azure AD accounts containing SQL metacharacters in display names or JWT claims can break out of string literals and execute arbitrary database queries.

Executive ViewAI

Why It Matters

phpMyFAQ versions prior to 4.1.2 contain a SQL injection vulnerability in Azure AD/Entra ID OAuth integration that allows authenticated users to execute arbitrary database queries. Organizations deploying phpMyFAQ with federated identity authentication face direct database compromise risk. While no active exploitation is documented, publicly available proof-of-concept code exists, requiring immediate patching.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-59943 CRITICAL POC
9.8 Oct 03

Duplicate-email registration handling in phpMyFAQ 4.0.7 through 4.0.13 (and 4.0-nightly-2025-10-03 and earlier) lets una

CVE-2023-5865 CRITICAL POC
9.8 Oct 31

Insufficient Session Expiration in GitHub repository thorsten/phpmyfaq prior to 3.2.2. Rated critical severity (CVSS 9.8

CVE-2023-1886 CRITICAL POC
9.8 Apr 05

Authentication Bypass by Capture-replay in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity

CVE-2023-1753 CRITICAL POC
9.8 Mar 31

Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity (CVSS 9.8), t

CVE-2022-3754 CRITICAL POC
9.8 Oct 29

Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.8. Rated critical severity (CVSS 9.8), th

CVE-2026-46364 CRITICAL POC
9.3 May 15

Unauthenticated SQL injection in phpMyFAQ before 4.1.2 allows remote attackers to extract credentials, admin tokens, and

CVE-2017-15730 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.ratings.php. Rated high severity (CVS

CVE-2017-15808 HIGH POC
8.8 Oct 23

In phpMyFaq before 2.9.9, there is CSRF in admin/ajax.config.php. Rated high severity (CVSS 8.8), this vulnerability is

CVE-2017-15735 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) for modifying a glossary. Rated high severity (CVSS

CVE-2017-15734 HIGH POC
8.8 Oct 22

In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.main.php. Rated high severity (CVSS 8

CVE-2024-28107 HIGH POC
8.8 Mar 25

phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi

CVE-2024-27299 HIGH POC
8.8 Mar 25

phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy