Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. thorsten/phpmyfaq
  4. ›
  5. GHSA-289f-fq7w-6q2w

GHSA-289f-fq7w-6q2w: phpMyFAQ has unauthenticated SQL injection via User-Agent header in BuiltinCaptcha

May 6, 2026 (updated June 8, 2026)

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

References

  • github.com/advisories/GHSA-289f-fq7w-6q2w
  • github.com/thorsten/phpMyFAQ/commit/b9f25109fddb38eee19987183798638d07943f92
  • github.com/thorsten/phpMyFAQ/security/advisories/GHSA-289f-fq7w-6q2w
  • nvd.nist.gov/vuln/detail/CVE-2026-46364
  • www.vulncheck.com/advisories/phpmyfaq-sql-injection-via-user-agent-header-in-builtincaptcha

Code Behaviors & Features

Detect and mitigate GHSA-289f-fq7w-6q2w with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 4.1.2

Fixed versions

  • 4.1.2

Solution

Upgrade to version 4.1.2 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

packagist/thorsten/phpmyfaq/GHSA-289f-fq7w-6q2w.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:11 +0000.