GHSA-jv8r-hv7q-p6vc
MEDIUMphpMyFAQ has Stored XSS in user list via admin-managed display_name
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
thorsten/phpmyfaqReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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<img>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:
<img src="x" onerror="alert(1)">
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.
- Both contain
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]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | thorsten/phpmyfaq | ≥ 4.0.14&&< 4.0.16 | 4.0.16 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for thorsten/phpmyfaq. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update thorsten/phpmyfaq to 4.0.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jv8r-hv7q-p6vc is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-jv8r-hv7q-p6vc is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-jv8r-hv7q-p6vc. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-jv8r-hv7q-p6vc in your dependencies?
O3 detects GHSA-jv8r-hv7q-p6vc across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.