CVE-2026-46367

CVE-2026-46367 is a high-severity cross-site scripting (XSS) vulnerability in thorsten/phpmyfaq (composer), affecting versions = 4.1.1. It is fixed in 4.1.2.

Summary

A stored XSS vulnerability in the comment rendering pipeline allows an authenticated user to inject JavaScript that executes for every visitor of an affected FAQ or News page. An attacker with a registered account can steal admin session cookies and take over the application.

Details

Utils::parseUrl() (phpmyfaq/src/phpMyFAQ/Utils.php, line 281) converts URLs in comment text into clickable <a> tags at render time:

$pattern = '/(https?:\/\/[^\s]+)/i';
$replacement = '<a href="$1">$1</a>';
return preg_replace($pattern, $replacement, $string);

The regex [^\s]+ matches " and <, and the URL is inserted into the href attribute with no htmlspecialchars() call. A URL with a literal " closes the attribute early and allows injecting event handlers like onmouseover.

This only reaches the sink when main.enableCommentEditor is enabled. In that path, comment text goes through sanitizeHtmlComment() instead of FILTER_SANITIZE_SPECIAL_CHARS, which encodes ", so the double-quote survives to storage. The comment is then passed through parseUrl() and rendered via {{ comment.comment|raw }} in comment.macros.twig (line 40), which disables Twig auto-escaping.

The same sink exists in the admin comment panel (admin/content/comments.twig, lines 62 and 112), so admins viewing the panel are also affected.

No Content-Security-Policy headers are set anywhere in the app.

PoC

Requirements:

  • main.enableCommentEditor = true (set in admin Configuration panel)
  • attacker has any registered user account
  • one FAQ entry with comments allowed exists

Steps:

  1. Log in as a registered user and open a FAQ with comments.

  2. Submit the following as the comment text:

    https://www.evil.com/"onmouseover="alert(document.cookie)
    

    (www. prefix required, parseUrl strips https:// then only re-adds
    it for www. URLs, which is what triggers the linkification)

  3. Any user who views that FAQ page and hovers the link triggers the
    payload. To hit an admin, wait for them to visit the page or check
    the admin comments panel at /admin/content/comments.

Resulting HTML in the page:

<a href="https://www.evil.com/"onmouseover="alert(document.cookie)">
  ...
</a>

The " closes the href attribute; onmouseover becomes a real attribute.

Impact

Stored XSS affecting all visitors of the page, including admins. Session cookie theft leads to full admin account takeover. The payload looks like a normal URL and persists until manually deleted.

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-2026-46367 has a CVSS score of 7.6 (High). The vector is network-reachable, low 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.1.2); upgrading removes the vulnerable code path.

Affected versions

thorsten/phpmyfaq (= 4.1.1) phpmyfaq/phpmyfaq (= 4.1.1)

Security releases

thorsten/phpmyfaq → 4.1.2 (composer) phpmyfaq/phpmyfaq → 4.1.2 (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 the following packages to resolve this vulnerability:

thorsten/phpmyfaq to 4.1.2 or later; phpmyfaq/phpmyfaq to 4.1.2 or later

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

Frequently Asked Questions

  1. What is CVE-2026-46367? CVE-2026-46367 is a high-severity cross-site scripting (XSS) vulnerability in thorsten/phpmyfaq (composer), affecting versions = 4.1.1. It is fixed in 4.1.2. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2026-46367? CVE-2026-46367 has a CVSS score of 7.6 (High). 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 packages are affected by CVE-2026-46367?
    • thorsten/phpmyfaq (composer) (versions = 4.1.1)
    • phpmyfaq/phpmyfaq (composer) (versions = 4.1.1)
  4. Is there a fix for CVE-2026-46367? Yes. CVE-2026-46367 is fixed in 4.1.2. Upgrade to this version or later.
  5. Is CVE-2026-46367 exploitable, and should I be worried? Whether CVE-2026-46367 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-2026-46367 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-2026-46367?
    • Upgrade thorsten/phpmyfaq to 4.1.2 or later
    • Upgrade phpmyfaq/phpmyfaq to 4.1.2 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.