Medium

phpMyFAQ has Stored XSS in user list via admin-managed display_name

  • Disclosed: 29.12.2025
  • Updated: 11.10.2026 10:22

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.php decodes display_name using html_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

  1. As an unauthenticated user, open the registration page and create a new account.
  2. Set the display name / real name field to the following entity-encoded payload:
    • <img src=x onerror=alert(1)>
  3. Complete registration.
  4. As an administrator, open the admin user list (example):
    • http://127.0.0.1:8080/admin/user/list
  5. 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): &lt;img src=x onerror=alert(1)&gt;
  • 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_decode for display_name in UserData.php and {{ user.display_name|raw }} in users.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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package thorsten/phpmyfaq >= 4.0.14, < 4.0.16 4.0.16

References

CVSS score 5.4/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
Composer
Package
thorsten/phpmyfaq
Disclosed
29.12.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-jv8r-hv7q-p6vc - CC BY 4.0

Vulnerability history: thorsten/phpmyfaq

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (112) in the archive
Total entries
112
First → latest
05.2022 09.2026
Without a fix
2
Exploited in attacks
0

Severity breakdown

  • Critical 8
  • High 36
  • Medium 67
  • Low 1

Disclosures per year

  1. 2022: 8
  2. 2023: 62
  3. 2024: 2
  4. 2025: 6
  5. 2026: 34
Severity:
  1. High · 8.1 CVE-2026-56737 >= 3.2.0, < 4.1.6 4.1.6
  2. High · 7.5 CVE-2026-35672 < 4.1.3 4.1.3
  3. High · 8.8 CVE-2026-35671 < 4.1.3 4.1.3
  4. High · 7.6 CVE-2026-46367 >= 4.1.1, < 4.1.2 4.1.2
  5. High · 7.5 CVE-2025-69200 < 4.0.16, >= 4.1.0-alpha, <= 4.1.0-beta.2 4.0.16
  6. phpMyFAQ has Stored XSS in user list via admin-managed display_name this entry
    Medium · 5.4 CVE-2025-68951 >= 4.0.14, < 4.0.16 4.0.16
  7. High · 8.1 CVE-2025-59943 >= 4.0.7, < 4.0.13 4.0.13
  8. High · 7.6 CVE-2023-5865 < 3.2.2 3.2.2
  9. High · 7.4 CVE-2023-5864 < 3.2.1 3.2.1
  10. High · 8.3 CVE-2023-5319 < 3.1.18 3.1.18
  11. Critical · 9.0 CVE-2023-5320 < 3.1.18 3.1.18
  12. Critical · 9.1 CVE-2023-5316 < 3.1.18 3.1.18
  13. High · 8.8 CVE-2023-4007 < 3.1.16 3.1.16
  14. High · 8.2 CVE-2023-2550 < 3.1.13 3.1.13
  15. High · 8.3 CVE-2023-1887 < 3.1.12 3.1.12
  16. High · 7.3 CVE-2023-1886 < 3.1.12 3.1.12
  17. Critical · 9.8 CVE-2023-0788 < 3.1.11 3.1.11
  18. Critical · 9.8 CVE-2023-0789 < 3.1.11 3.1.11
  19. High · 8.8 CVE-2023-0790 < 3.1.11 3.1.11
  20. High · 8.8 CVE-2023-0793 < 3.1.11 3.1.11
Show more (5) Showing 40 of 45

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.