Security Digest · Vulnerability record

CVE-2026-46364: phpMyFAQ has unauthenticated SQL injection via User-Agent header in BuiltinCaptcha

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.

CVSS 9.3 Critical EPSS 2.1% · p82

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 2.1%, percentile 82: FIRST’s model estimates a 2.1% chance of exploitation activity in the next 30 days, higher than 82% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes thorsten/phpmyfaq (Composer (PHP)) <= 4.1.1, fixed in 4.1.2; phpmyfaq/phpmyfaq (Composer (PHP)) <= 4.1.1, fixed in 4.1.2. Check your lockfile, including transitive dependencies.

What it is

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.

From the GitHub advisory

Summary

BuiltinCaptcha::garbageCollector() and BuiltinCaptcha::saveCaptcha() at phpmyfaq/src/phpMyFAQ/Captcha/BuiltinCaptcha.php:298 and :330 interpolate the User-Agent header and client IP address into DELETE and INSERT queries with sprintf and no escaping. Both methods run on every hit to the public GET /api/captcha endpoint, which requires no authentication. An unauthenticated attacker sets the User-Agent header to a crafted SQL payload and runs SLEEP(), BENCHMARK(), or time-based blind extraction against the database that backs phpMyFAQ. Verified live against 4.2.0-alpha (master at b9f25109): baseline request 147 ms, request with User-Agent: x' OR SLEEP(2) OR 'x 4.09 s (two SLEEP(2) calls, one per vulnerable sink).

Details

phpmyfaq/src/phpMyFAQ/Captcha/BuiltinCaptcha.php:112 populates two private fields from untrusted HTTP input at construction time:

Both fields are then dropped into sprintf() SQL templates without ever touching Database::escape() or a prepared statement.

Weakness type: CWE-89.

Product: thorsten/phpmyfaq (Composer (PHP)) · Assigned by: VulnCheck · Published: 2026-05-15

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Composer (PHP)thorsten/phpmyfaq<= 4.1.14.1.2
Composer (PHP)phpmyfaq/phpmyfaq<= 4.1.14.1.2
VendorProductAffected versions (per CVE record)
thorstenphpmyfaq< 4.1.2

Severity scores

Scored byCVSSScoreVector
VulnCheck3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
VulnCheck4.09.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub3.19.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 2.12% probability of exploitation activity in the next 30 days; percentile 82.

Timeline

  • — GitHub-reviewed advisory GHSA-289f-fq7w-6q2w published (critical)
  • — CVE record published by VulnCheck
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vendor and project advisories, patches

  1. GHSA Advisory GHSA-289f-fq7w-6q2w github.com
  2. Vendor advisory (github.com) github.com

Vulnerability records

  1. GitHub Advisory GHSA-289f-fq7w-6q2w github.com
  2. CVE.org record CVE-2026-46364 cve.org
  3. NVD entry CVE-2026-46364 nvd.nist.gov

Other references from the CVE record and advisory

  1. VulnCheck Advisory: phpMyFAQ - SQL Injection via User-Agent Header in BuiltinCaptcha vulncheck.com

Critical Composer (PHP) advisories · Today’s Security Digest