Skip to main content

CVE-2026-32629 — Vulnerability in thorsten/phpmyfaq — CVE Details

MEDIUM

phpMyFAQ is Vulnerable to Stored XSS via Unsanitized Email Field in Admin FAQ Editor

Published March 31, 2026Updated April 6, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.32%). Schedule for your next planned update.

Does your project use an affected thorsten/phpmyfaq version?

Paste your composer.lock to check it for CVE-2026-32629 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Summary

An unauthenticated attacker can submit a guest FAQ with an email address that is syntactically valid per RFC 5321 (quoted local part) yet contains raw HTML — for example "alert(1)"@evil.com. PHP's FILTER_VALIDATE_EMAIL accepts this email as valid. The email is stored in the database without HTML sanitization and later rendered in the admin FAQ editor template using Twig's |raw filter, which bypasses auto-escaping entirely.

Details

  1. PHP FILTER_VALIDATE_EMAIL accepts RFC-valid quoted local parts with dangerous characters

phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/FaqController.php:99 $email = trim((string) Filter::filterVar($data->email, FILTER_VALIDATE_EMAIL)); PHP accepts "alert(1)"@evil.com as a valid email (RFC 5321 allows <, > inside quoted local parts). Confirmed: "alert(1)"@evil.com => string (valid, not false)

  1. Email stored raw without HTML sanitization

phpmyfaq/src/phpMyFAQ/Faq.php — email retrieved directly as $row->email from the database.

  1. Admin Twig template renders email with |raw

phpmyfaq/assets/templates/admin/content/faq.editor.twig:296

Affected version: 4.2.0-alpha, commit f0dc86c8f

PoC

The reproduction of the vulnerability was implemented with the help of AI while reviewing the source code to generate the proof-of-concept. Please kindly note this for reference. Since the vulnerability has already been confirmed directly in the source code, the proof-of-concept code may be considered as a reference only.

Please extract the attached compressed file and proceed. poc.zip

  1. (docker compose -f docker-compose.yml down -v)
  2. docker compose -f docker-compose.yml up -d mariadb php-fpm nginx
  3. bash exploit.sh

  1. Access http://localhost:8888/admin/
  2. Log in with admin / Admin1234!
  3. After logging in, check whether the URL remains http://localhost:8888/admin/
  4. Go to Content → FAQ Administration → edit "poc" → alert popup should appear If it does not appear, you can also access it directly via: http://localhost:8888/admin/faq/edit/1/en

Impact

When an administrator opens /admin/faq/edit/{id}/{lang} to review the pending FAQ, the injected script executes in the admin's browser context. This allows an attacker to:

  • Steal the administrator's session cookie → full admin account takeover
  • Perform arbitrary admin actions (create users, modify content, change configuration)
  • Pivot to further attacks on the server

The attack chain requires no authentication. By default, records.allowNewFaqsForGuests=true allows unauthenticated FAQ submission, and records.defaultActivation=false guarantees the administrator must visit the edit page to review it.

Note on captcha: The built-in captcha is enabled by default when the PHP gd extension is present (spam.enableCaptchaCode=true). This prevents fully automated exploitation but does not prevent a targeted manual attack — an attacker can solve the captcha once and submit the payload.

Credits

wooseokdotkim

Advisory Timeline

  • First published March 31, 2026 (240 days ago).
  • Last revised April 6, 2026 — 6 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update thorsten/phpmyfaq to 4.1.1 or later
composer require "thorsten/phpmyfaq:^4.1.1"
Composer
Update phpmyfaq/phpmyfaq to 4.1.1 or later
composer require "phpmyfaq/phpmyfaq:^4.1.1"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Packagist (2).

PackageFixed In
thorsten/phpmyfaq Packagist · Affected: 2.10.0-alpha, 2.8.0, 2.8.0-RC, 2.8.0-RC2 (+165 more)4.1.1
phpmyfaq/phpmyfaq Packagist · Affected: 2.10.0-alpha, 2.8.0, 2.8.0-RC, 2.8.0-RC2 (+165 more)4.1.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N/E:P

Frequently Asked Questions

What is CVE-2026-32629?
phpMyFAQ is Vulnerable to Stored XSS via Unsanitized Email Field in Admin FAQ Editor. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 9.3/10).
How do I check if my project is affected by CVE-2026-32629?
CVE-2026-32629 affects thorsten/phpmyfaq and phpmyfaq/phpmyfaq. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-32629 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.3

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.32%
EPSS percentile: 17.9

This is a below-median EPSS score — only 17.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-98gw-w575-h2ph

Related CVEs

  • CVE-2026-46364
    CRITICAL

    phpMyFAQ has unauthenticated SQL injection via User-Agent header in BuiltinCaptcha

  • CVE-2026-45010
    CRITICAL

    phpMyFAQ enables unauthenticated 2FA brute-force attack via /admin/check acceptance of arbitrary user-id

  • CVE-2026-56737
    HIGH

    phpMyFAQ's two-factor authentication login bypasses the password factor

  • CVE-2026-56396
    HIGH

    phpMyFAQ has an incomplete fix for GHSA-xvp4-phqj-cjr3 — editUser() and updateUserRights() lack authorization guards

  • CVE-2026-35676
    HIGH

    phpMyFAQ: Unauthenticated Password Reset Endpoint Allows User Enumeration and Forced Password Change Without Token Validation

  • CVE-2026-57995
    HIGH

    phpMyFAQ privilege escalation: GroupController::updatePermissions lets a GROUP_EDIT admin grant rights they do not hold

  • CVE-2026-35671
    HIGH

    phpMyFAQ: IDOR Account Takeover

  • CVE-2023-53929
    MEDIUM

    phpMyFAQ contains a CSV injection vulnerability

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock