Skip to main content
Vulnerability Database/CVE-2026-47132

CVE-2026-47132: phpMyFAQ SQL Injection Vulnerability

CVE-2026-47132 is an SQL LIKE wildcard injection flaw in phpMyFAQ that allows authenticated users to bypass search filters and enumerate active users. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-47132 Overview

phpMyFAQ is an open source frequently asked questions (FAQ) web application. CVE-2026-47132 is an authenticated SQL LIKE wildcard injection in the chat user search endpoint. The endpoint escapes SQL string syntax but does not escape the % and _ characters, which remain active LIKE wildcards. Any logged-in user can bypass the intended display-name search filter and enumerate active users of the application. The flaw is tracked under CWE-20: Improper Input Validation. Version 4.2.0-alpha patches the issue.

Critical Impact

Authenticated attackers can enumerate every active phpMyFAQ user by submitting wildcard characters through the chat user search, exposing display names regardless of the attacker's intended search scope.

Affected Products

  • phpMyFAQ versions prior to 4.2.0-alpha
  • phpMyFAQ chat module (phpmyfaq/src/phpMyFAQ/Chat.php)
  • Deployments exposing authenticated chat functionality to standard users

Discovery Timeline

  • 2026-09-24 - CVE-2026-47132 published to the National Vulnerability Database (NVD)
  • 2026-09-24 - Last updated in NVD database

Technical Details for CVE-2026-47132

Vulnerability Analysis

The vulnerability resides in the searchUsers method within phpmyfaq/src/phpMyFAQ/Chat.php. The method accepts a user-supplied $searchTerm, lowercases it, and passes it through the database driver's escape() function. That routine escapes SQL quoting metacharacters but leaves LIKE metacharacters untouched. The sanitized term is then concatenated into a LIKE '%...%' clause against ud.display_name.

Because % matches any sequence of characters and _ matches any single character, an attacker who submits a single % or an empty-equivalent wildcard pattern receives every active user's user_id and display_name in the response, up to the configured LIMIT. Repeated queries with alphabetic prefixes allow full enumeration of the user directory.

Root Cause

The root cause is incomplete input sanitization for a LIKE predicate. The driver's escape() function addresses SQL string injection but does not neutralize LIKE wildcards, and no ESCAPE clause was declared on the query. The feature therefore trusts user input to represent a literal substring when it is actually interpreted as a pattern.

Attack Vector

Exploitation requires authentication but no elevated privileges and no user interaction. Any account that can reach the chat user search endpoint can submit a crafted search term over the network. The impact is limited to information disclosure of active user identifiers and display names, which supports follow-on social engineering, password spraying, or targeted account takeover attempts.

php
     public function searchUsers(string $searchTerm, int $excludeUserId, int $limit = 10): array
     {
         $escapedTerm = $this->configuration->getDb()->escape(mb_strtolower($searchTerm));
+
+        // Escape LIKE metacharacters (%, _) to prevent wildcard injection
+        $escapedTerm = str_replace(['|', '%', '_'], ['||', '|%', '|_'], $escapedTerm);
+
         $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 LOWER(ud.display_name) LIKE '%%%s%%' ESCAPE '|'
                AND u.account_status = 'active'
              LIMIT %d",
             Database::getTablePrefix(),

Source: phpMyFAQ commit bd4b08b. The patch pre-escapes |, %, and _ in the search term and adds ESCAPE '|' to the LIKE clause so wildcard metacharacters are treated as literals.

Detection Methods for CVE-2026-47132

Indicators of Compromise

  • Repeated authenticated requests to the chat user search endpoint containing single-character payloads such as %, _, a%, or b%.
  • Response payloads that return the full user list or a disproportionate number of display_name entries relative to the query size.
  • Access patterns in which one low-privilege account iterates through alphabetic search prefixes within a short time window.

Detection Strategies

  • Review web server and application logs for chat user search requests whose query parameters contain unescaped % or _ characters.
  • Correlate authenticated session identifiers with the volume of unique user_id values returned to identify enumeration behavior.
  • Alert when a single session issues more user search queries in a short interval than legitimate users typically generate.

Monitoring Recommendations

  • Enable verbose logging on the phpMyFAQ chat endpoints to capture query parameters and response sizes.
  • Forward phpMyFAQ and reverse-proxy access logs to a centralized logging platform for retention and search.
  • Track per-account rates of chat user search calls and flag outliers for review.

How to Mitigate CVE-2026-47132

Immediate Actions Required

  • Upgrade phpMyFAQ to version 4.2.0-alpha or later, which contains the patched searchUsers implementation.
  • Audit recent chat user search activity for enumeration patterns prior to applying the fix.
  • Rotate credentials for any accounts flagged in suspected enumeration windows, especially administrators surfaced via display_name.

Patch Information

The fix is delivered in phpMyFAQ 4.2.0-alpha through commit bd4b08b012234ccfcff07bfe6518062475b29e0a. The patch escapes |, %, and _ in the search term and declares ESCAPE '|' on the LIKE clause. See the GitHub Security Advisory GHSA-6pvm-2vjj-rx4w for coordinated disclosure details.

Workarounds

  • Restrict access to the chat module to trusted user groups until the upgrade is deployed.
  • Place a web application firewall (WAF) rule in front of the chat search endpoint to block query parameters containing bare % or _ wildcard characters.
  • Reduce the LIMIT applied to the user search response or disable the chat user search feature in deployments where it is non-essential.
bash
# Example ModSecurity rule to block LIKE wildcard characters in the chat user search parameter
SecRule REQUEST_URI "@contains /api/chat/users" \
  "id:1004712,phase:2,deny,status:400,msg:'phpMyFAQ CVE-2026-47132 wildcard injection attempt',\
   chain"
  SecRule ARGS:search "@rx [%_]" "t:none,t:urlDecodeUni"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.