Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify exposed phpMyFAQ instance
-
DeliverySend GET /api/captcha with malicious User-Agent
-
ExploitTrigger unsanitized sprintf SQL in BuiltinCaptcha sinks
-
ExecutionTime-based blind extraction of faquser table
-
PersistHarvest admin tokens and SMTP credentials
-
ImpactAuthenticate 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – 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)
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.
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
Affected Packages
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
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
Lifecycle Timeline
1DescriptionCVE.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
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.
Apply vendor patch: upgrade to phpMyFAQ 4.1.2 or later.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Duplicate-email registration handling in phpMyFAQ 4.0.7 through 4.0.13 (and 4.0-nightly-2025-10-03 and earlier) lets una
Insufficient Session Expiration in GitHub repository thorsten/phpmyfaq prior to 3.2.2. Rated critical severity (CVSS 9.8
Authentication Bypass by Capture-replay in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity
Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated critical severity (CVSS 9.8), t
Weak Password Requirements in GitHub repository thorsten/phpmyfaq prior to 3.1.8. Rated critical severity (CVSS 9.8), th
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.ratings.php. Rated high severity (CVS
In phpMyFaq before 2.9.9, there is CSRF in admin/ajax.config.php. Rated high severity (CVSS 8.8), this vulnerability is
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) for modifying a glossary. Rated high severity (CVSS
In phpMyFAQ before 2.9.9, there is Cross-Site Request Forgery (CSRF) in admin/stat.main.php. Rated high severity (CVSS 8
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi
phpMyFAQ is an open source FAQ web application for PHP 8.1+ and MySQL, PostgreSQL and other databases. Rated high severi
Improper Privilege Management in GitHub repository thorsten/phpmyfaq prior to 3.1.12. Rated high severity (CVSS 8.8), th
EUVD-2026-30601
GHSA-ch9q-c9mp-j5gq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB