CVE-2025-68951

CVE-2025-68951 is a medium-severity cross-site scripting (XSS) vulnerability in thorsten/phpmyfaq (composer), affecting versions >= 4.0.14, < 4.0.16. It is fixed in 4.0.16.

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., &lt;img ...&gt;). 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., &lt;img ...&gt;).
  • 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:
    • &lt;img src=x onerror=alert(1)&gt;
  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.

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

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.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2025-68951 has a CVSS score of 5.4 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.0.16); upgrading removes the vulnerable code path.

Affected versions

thorsten/phpmyfaq (>= 4.0.14, < 4.0.16)

Security releases

thorsten/phpmyfaq → 4.0.16 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade thorsten/phpmyfaq to 4.0.16 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-68951? CVE-2025-68951 is a medium-severity cross-site scripting (XSS) vulnerability in thorsten/phpmyfaq (composer), affecting versions >= 4.0.14, < 4.0.16. It is fixed in 4.0.16. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2025-68951? CVE-2025-68951 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of thorsten/phpmyfaq are affected by CVE-2025-68951? thorsten/phpmyfaq (composer) versions >= 4.0.14, < 4.0.16 is affected.
  4. Is there a fix for CVE-2025-68951? Yes. CVE-2025-68951 is fixed in 4.0.16. Upgrade to this version or later.
  5. Is CVE-2025-68951 exploitable, and should I be worried? Whether CVE-2025-68951 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-68951 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-68951? Upgrade thorsten/phpmyfaq to 4.0.16 or later.

Other vulnerabilities in thorsten/phpmyfaq

CVE-2026-49205CVE-2026-48488CVE-2026-35675CVE-2026-35672CVE-2026-35671

Stop the waste.
Protect your environment with Kodem.