Skip to main content

phpMyFAQ CVE-2026-46364

| EUVDEUVD-2026-30601 CRITICAL
SQL Injection (CWE-89)
9.3
CVSS 4.0 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Identify exposed phpMyFAQ instance
  2. Delivery
    Send GET /api/captcha with malicious User-Agent
  3. Exploit
    Trigger unsanitized sprintf SQL in BuiltinCaptcha sinks
  4. Execution
    Time-based blind extraction of faquser table
  5. Persist
    Harvest admin tokens and SMTP credentials
  6. Impact
    Authenticate to admin panel or abuse mail relay

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

Exploitation requires only that the phpMyFAQ instance is running a version below 4.1.2 and that the public GET /api/captcha endpoint is reachable by the attacker - this endpoint is enabled by default and requires no authentication, no user interaction, and no special configuration. The only limiting factors are network reachability to the application and the database backend supporting the SLEEP() or BENCHMARK() function (MySQL, MariaDB, PostgreSQL with pg_sleep adaptation); deployments behind authenticated reverse proxies, IP allowlists, or WAFs that drop suspicious User-Agent headers would block the attack path.

Impact

CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H gives 9.3 - network-reachable, low-complexity, no privileges, no user interaction, with high confidentiality/integrity/availability impact on the vulnerable component. SSVC reinforces this with Automatable: yes and Technical Impact: total, meaning a single HTTP request can fully compromise the database. However, EPSS sits at only 0.05% (15th percentile) and SSVC Exploitation is rated 'none', indicating no observed exploitation activity yet despite the trivial mechanics. Not in CISA KEV. The mismatch between high CVSS/automatability and low EPSS is typical for freshly disclosed open-source CVEs where mass scanning has not yet ramped - defenders running phpMyFAQ should treat this as a high real-world priority because the preconditions (unauth endpoint + verified time-based blind extraction at 4 seconds per probe) make weaponization straightforward.

Exploit ScenarioDerived

An attacker locates an internet-exposed phpMyFAQ instance and issues a single GET request to /api/captcha with User-Agent set to a time-based blind payload such as x' OR SLEEP(2) OR 'x, observing a ~4 second response (two SLEEP calls, one per vulnerable sink) versus a ~150ms baseline. They then script bit-by-bit extraction of the faquser, faqconfig, and related tables to harvest admin password hashes, API tokens, and SMTP credentials, which are subsequently used to log into the admin panel or pivot to mail-based phishing. The GHSA writeup includes a working PoC payload, making automation with sqlmap or a custom script trivial.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
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

Unauthenticated SQL injection in phpMyFAQ before 4.1.2 allows remote attackers to extract credentials, admin tokens, and SMTP secrets by sending a crafted User-Agent header to the public GET /api/captcha endpoint. The flaw sits in BuiltinCaptcha::garbageCollector() and BuiltinCaptcha::saveCaptcha(), which interpolate the header into DELETE and INSERT statements via sprintf with no escaping. No public exploit identified at time of analysis, though VulnCheck has published a detailed reachability writeup and a verified time-based blind PoC payload appears in the GHSA advisory.

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

Unauthenticated SQL injection in phpMyFAQ before 4.1.2 allows remote attackers to extract credentials and secrets from the backing database by sending a crafted User-Agent header to the public /api/captcha endpoint. The BuiltinCaptcha class interpolates the header directly into DELETE and INSERT statements via sprintf with no escaping, enabling time-based blind extraction of user passwords, admin tokens, and SMTP credentials. No public exploit identified at time of analysis, and EPSS is very low (0.05%, 15th percentile), but the CVSS 4.0 score of 9.3 and confirmed reachability via a public endpoint make this a high-priority patch.

v1 May 15, 2026 - 19:30 CVSS 9.8

Unauthenticated SQL injection in phpMyFAQ versions before 4.1.2 allows remote attackers to extract sensitive database information including user credentials, admin tokens, and SMTP credentials via crafted User-Agent headers sent to the public /api/captcha endpoint. The vulnerability exists in the BuiltinCaptcha class where unsanitized User-Agent and IP address values are directly interpolated into SQL DELETE and INSERT queries without escaping or parameterization.

RemediationAI

Vendor-released patch: upgrade to phpMyFAQ 4.1.2 or later, available from the maintainers per advisory https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-289f-fq7w-6q2w. Composer users should run composer update thorsten/phpmyfaq to pull >=4.1.2. If immediate upgrade is not possible, block or rate-limit the GET /api/captcha endpoint at the reverse proxy or WAF, and strip or whitelist the User-Agent header before it reaches PHP - this will break captcha generation for legitimate users and visually disable the captcha challenge on forms, so plan a maintenance window. A WAF rule rejecting SQL keywords (SLEEP, BENCHMARK, UNION, single quotes) in User-Agent headers is a narrower stopgap but will produce false positives for security scanners and exotic browser strings. Additional vendor context is available at https://www.vulncheck.com/advisories/phpmyfaq-sql-injection-via-user-agent-header-in-builtincaptcha and https://vuldb.com/vuln/364249.

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 a PHP-based open-source FAQ management system tracked under CPE cpe:2.3:a:thorsten:phpmyfaq. The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). In phpmyfaq/src/phpMyFAQ/Captcha/BuiltinCaptcha.php at lines 298 and 330, the $this->userAgent and $this->ip values, populated directly from request headers in the constructor, are concatenated into raw SQL via sprintf() and dispatched through $db->query() without going through the existing Database::escape() helper or a prepared statement. The same file's checkCaptchaCode() at line 472 does use $db->escape(), confirming the sanitizer was available but skipped in the two captcha lifecycle sinks. Both sinks fire on every request to the unauthenticated GET /api/captcha route exposed by CaptchaController.

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

NVD PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
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

1
CVSS changed
May 28, 2026 - 16:22 NVD
9.8 (CRITICAL) 9.3 (CRITICAL)

DescriptionCVE.org

phpMyFAQ before 4.1.2 contains an unauthenticated SQL injection vulnerability in BuiltinCaptcha::garbageCollector() and BuiltinCaptcha::saveCaptcha() methods that interpolate unsanitized User-Agent headers into DELETE and INSERT queries. Unauthenticated attackers can exploit the public GET /api/captcha endpoint by crafting malicious User-Agent headers to perform time-based blind SQL injection, extracting sensitive data including user credentials, admin tokens, and SMTP credentials from the database.

Executive ViewAI

Why It Matters

phpMyFAQ versions before 4.1.2 contain an unauthenticated SQL injection vulnerability in a public API endpoint that enables remote extraction of admin credentials, authentication tokens, and SMTP secrets without any authentication requirement. Publicly available exploit code exists, creating immediate risk to account security and email infrastructure control. Organizations running affected versions face direct threat of credential compromise and lateral movement.

Business Impact: Severe
Compensating Controls

Apply vendor patch: upgrade to phpMyFAQ 4.1.2 or later.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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 CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
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
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

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

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

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

CVE-2023-1762 HIGH POC
8.8 Mar 31

Improper Privilege Management in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated high severity (CVSS 8.8), th

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