CVE-2025-68951: phpMyFAQ has Stored XSS in user list via admin-managed display_name
Summary A stored cross-site scripting (XSS) vulnerability allows an attacker to execute arbitrary JavaScript in an administrator’s browser by registering a user whose display name contains HTML entities (e.g., <img ...>). When an administrator views the admin user list, the payload is decoded server-side and rendered without escaping, resulting in script execution in the admin context.
Published Dec 29, 2025 · Updated Dec 31, 2025
Affected packages
thorsten/phpmyfaq
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.0.14, < 4.0.16
- Fixed in
- 4.0.16
- Check
composer show thorsten/phpmyfaq
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A stored cross-site scripting (XSS) vulnerability allows an attacker to execute arbitrary JavaScript in an administrator’s browser by registering a user whose display name contains HTML entities (e.g., <img ...>). When an administrator views the admin user list, the payload is decoded server-side and rendered without escaping, resulting in script execution in the admin context.
Details
Root cause is the following chain:
- User-controlled input stored: attacker-provided
display_name(real name) is stored in DB (often as HTML entities, e.g.,<img ...>). - Decode on read:
phpmyfaq/src/phpMyFAQ/User/UserData.phpdecodesdisplay_nameusinghtml_entity_decode(...)(“for backward compatibility”). - Unsafe sink: admin user list renders the decoded value unescaped using Twig
|raw: phpmyfaq/assets/templates/admin/user/users.twig(users table uses{{ user.display_name|raw }})
As a result, an entity-encoded payload becomes active HTML/JS when rendered in the admin user list.
Note: This report is about the display_name field + entity-decoding path. It is distinct from previously published issues focused on the email field.
PoC (minimal reproduction)
Preconditions / configuration
- Registration enabled (
security.enableRegistration = true). - Attacker does not need admin privileges.
- Admin must view the admin user list page.
Steps
- As an unauthenticated user, open the registration page and create a new account.
- Set the display name / real name field to the following entity-encoded payload:
<img src=x onerror=alert(1)>- Complete registration.
- As an administrator, open the admin user list (example):
http://127.0.0.1:8080/admin/user/list- Observe JavaScript execution in the admin’s browser (e.g.,
alert(1)triggers) and the payload is rendered as an actual `` element.
Impact
Stored XSS in the admin context can enable:
- admin session compromise (depending on cookie flags),
- CSRF token exfiltration and privileged admin actions,
- UI redress/phishing within the admin panel.
Evidence (what I observed)
- Stored DB value (entities):
<img src=x onerror=alert(1)> - Rendered HTML in admin user list: ``
Affected versions
Confirmed by code inspection
- 4.0.14
- 4.0.15
- Both contain
html_entity_decodefordisplay_nameinUserData.phpand{{ user.display_name|raw }}inusers.twig.
Confirmed by live reproduction
- 4.1.0-RC (tested on current source checkout)
Environment (tested)
- Host OS: macOS 15.6.1 (24G90)
- Web container OS: Debian GNU/Linux 12 (bookworm)
- PHP: 8.4.5RC1
- DB: MariaDB 11.6.2
- phpMyFAQ source commit (tested): bca1c4192c2ad61a3595b4289d9551a51e0e9848
Contact / Credit
- Contact: [email protected]
Credited to eclipse07077-ljw.
References
- https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-jv8r-hv7q-p6vc
- https://nvd.nist.gov/vuln/detail/CVE-2025-68951
- https://github.com/thorsten/phpMyFAQ/commit/61829e83411f7b28bc6fd1052bfde54c32c6c370
- https://github.com/thorsten/phpMyFAQ/commit/8211d1d25951b4c272443cfc3ef9c09b1363fd87
- https://github.com/advisories/GHSA-jv8r-hv7q-p6vc
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-56736
phpMyFAQ has Stored XSS in Admin FAQ Editor via HTML Entity Bypass in Frontend FAQ Submission
high8.2Sep 24, 2026CVE-2026-56737
phpMyFAQ's two-factor authentication login bypasses the password factor
high8.1Sep 24, 2026CVE-2026-56738
phpMyFAQ has SQL Injection in `StopWords::add()` — Unescaped Stop Word Insertion
high8.5Sep 24, 2026GHSA-88g4-74f3-63x9
phpMyFAQ has Potential Authenticated Path Traversal in PDF Export
medium4.9Aug 25, 2026GHSA-mf8r-wm2w-f8c5
phpMyFAQ public FAQ APIs expose inactive FAQ content
medium5.3Aug 25, 2026GHSA-pg62-f8g4-4wqh
phpMyFAQ privilege escalation: GroupController::updatePermissions lets a GROUP_EDIT admin grant rights they do not hold
high8.8Aug 25, 2026
