Skip to main content

PHP CVE-2026-34973

MEDIUM
Improper Neutralization of Special Elements in Data Query Logic (CWE-943)
2026-04-01 https://github.com/thorsten/phpMyFAQ GHSA-gcp9-5jc8-976x
6.9
CVSS 4.0 · Vendor: https://github.com/thorsten/phpMyFAQ
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
Impact

Although CVSS and EPSS scores are not provided, the real-world risk is moderate to high despite the straightforward attack mechanics. The attack vector is network-accessible and requires no authentication (AV:N, PR:N implied from unauthenticated search access), with low attack complexity since the payload is a simple three-character string (_%_). The technical impact is confidentiality breach (information disclosure of custom pages), not integrity or availability compromise. SSVC considerations: exploitation is trivial (publicly documented PoC exists in the CVE description), automatable (simple HTTP request to search endpoint with crafted parameter), and causes targeted information disclosure rather than system-wide compromise. However, the risk is bounded by the fact that phpMyFAQ custom pages must exist and contain sensitive data for real-world impact; enumeration of non-sensitive FAQ content has limited business risk. Compared to injection flaws affecting authentication or data modification, this information disclosure is lower priority but should not be ignored in production environments where custom pages contain sensitive material. The fix is straightforward and low-risk, favoring prompt patching.

Exploit ScenarioDerived

An unauthenticated attacker accesses the phpMyFAQ public search interface and submits a search query containing the three-character string _%_ (underscore, percent, underscore). The backend constructs a SQL WHERE clause with (page_title LIKE '%_%_%' OR content LIKE '%_%_%'), which matches any custom page containing at least one character in the title or content field. This pattern effectively returns the entire set of custom pages, allowing the attacker to enumerate sensitive or private FAQ content (e.g., internal procedures, confidential answers) that would not appear in a normal exact-match search. No special privileges or authentication are required, and the request requires only a standard HTTP GET/POST to the search endpoint.

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

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

Alert me

AnalysisAIv1 – Apr 02, 2026

Information disclosure in phpMyFAQ allows unauthenticated attackers to enumerate custom page content by injecting SQL LIKE wildcards (% and _) into the search term, bypassing intended search filters. The searchCustomPages() method in Search.php uses real_escape_string() which does not escape LIKE metacharacters, enabling an attacker to craft queries like _%_ that match all records regardless of intended search scope. This vulnerability has no authentication requirement and affects the publicly accessible search functionality.

RemediationAI

Apply the vendor-released patch from the phpMyFAQ project as documented in the GitHub security advisory at https://github.com/advisories/GHSA-gcp9-5jc8-976c. The fix requires escaping SQL LIKE metacharacters in search terms before embedding them into LIKE clauses; the recommended approach is to add str_replace(['\', '%', '_'], ['\\', '\%', '\_'], $word) before constructing the LIKE condition, or migrate to parameterized queries with properly escaped LIKE values. Operators should upgrade to the patched phpMyFAQ version indicated in the advisory and verify that custom pages are not exposed through unauthenticated search.

Affected Packages

composer thorsten/phpmyfaq fix: 4.1.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

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

Technical ContextAI · show details

The vulnerability exists in the searchCustomPages() method which constructs SQL LIKE clauses by concatenating user-controlled search terms after escaping via mysqli::real_escape_string() (wrapped in the escape() function). While real_escape_string() properly escapes SQL string delimiters such as single quotes, backslashes, and NULL bytes, it explicitly does not escape the LIKE pattern metacharacters % (wildcard for any sequence of characters) and _ (wildcard for any single character). These characters have special meaning only within LIKE predicates, not in string literals, so the MySQL escaping function omits them. The vulnerable code embeds the insufficiently-escaped search term directly into LIKE clause patterns like '%<term>%', allowing an attacker to inject % or _ to expand the matching scope. The root cause is CWE-943 (Improper Neutralization of Special Elements in Data Query Logic), specifically the failure to apply context-aware escaping for LIKE syntax. Affected product is phpMyFAQ (CPE: pkg:composer/thorsten_phpmyfaq) across all versions where this code pattern exists.

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 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/thorsten/phpMyFAQ) · only source for this CVE.

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

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

Lifecycle Timeline

2
Patch released
Apr 02, 2026 - 14:30 nvd
Patch available
CVE Published
Apr 01, 2026 - 23:41 nvd
MEDIUM 6.9

DescriptionCVE.org

Summary

The searchCustomPages() method in phpmyfaq/src/phpMyFAQ/Search.php uses real_escape_string() (via escape()) to sanitize the search term before embedding it in LIKE clauses. However, real_escape_string() does not escape SQL LIKE metacharacters % (match any sequence) and _ (match any single character). An unauthenticated attacker can inject these wildcards into search queries, causing them to match unintended records - including content that was not meant to be surfaced - resulting in information disclosure.

Details

File: phpmyfaq/src/phpMyFAQ/Search.php, lines 226-240

Vulnerable code:

php
$escapedSearchTerm = $this->configuration->getDb()->escape($searchTerm);
$searchWords = explode(' ', $escapedSearchTerm);
$searchConditions = [];

foreach ($searchWords as $word) {
    if (strlen($word) <= 2) {
        continue;
    }
    $searchConditions[] = sprintf(
        "(page_title LIKE '%%%s%%' OR content LIKE '%%%s%%')",
        $word,
        $word
    );
}

escape() calls mysqli::real_escape_string(), which escapes characters like ', \, NULL, etc. - but explicitly does not escape % or _, as these are not SQL string delimiters. They are, however, LIKE pattern wildcards.

Attack vector:

A user submits a search term containing _ or % as part of a 3+ character word (to bypass the strlen <= 2 filter). Examples:

  • Search for a_b → LIKE becomes '%a_b%' → _ matches any single character, e.g. matches "aXb", "a1b", "azb" - broader than the literal string a_b
  • Search for te%t → LIKE becomes '%te%t%' → matches test, text, te12t, etc.
  • Search for _%_ → LIKE becomes '%_%_%' → matches any record with at least one character, effectively dumping all custom pages

This allows an attacker to retrieve custom page content that would not appear in normal exact searches, bypassing intended search scope restrictions.

PoC

  1. Navigate to the phpMyFAQ search page (accessible to unauthenticated users by default).
  2. Submit a search query: _%_ (underscore, percent, underscore - length 3, bypasses the <= 2 filter).
  3. The backend executes: WHERE (page_title LIKE '%_%_%' OR content LIKE '%_%_%')
  4. This matches all custom pages with at least one character in title or content - returning content that would not appear for a specific search term.

Impact

  • Authentication required: None - search is publicly accessible
  • Affected component: searchCustomPages() in Search.php; custom pages (faqcustompages table)
  • Impact: Unauthenticated users can enumerate/disclose all custom page content regardless of the intended search term filter
  • Fix: Escape % and _ in LIKE search terms before interpolation:
php
  $word = str_replace(['\\', '%', '_'], ['\\\\', '\\%', '\\_'], $word);

Or use parameterized queries with properly escaped LIKE values.

Threat Intelligence Overview

EPSS Score
0.1%
Top 74% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
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.

NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.

Affected Products (CPE)CVE.org

pkg:composer/thorsten_phpmyfaq

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