CVE-2026-46367: phpMyFAQ has stored XSS via Utils :parseUrl() Vulnerability
HIGHCVE-2026-46367 is a HIGH (CVSS 7.6) :parseurl() vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting phpMyFAQ has stored XSS via Utils libraries in the Packagist ecosystem. The issue involves :parseurl() in comment rendering. Remediation is available by upgrading affected packages to version 4.1.2.
CVE-2026-46367 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2026-46367
To remediate this vulnerability, upgrade all affected phpMyFAQ has stored XSS via Utils dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade thorsten/phpmyfaq to 4.1.2
Upgrade phpmyfaq/phpmyfaq to 4.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for thorsten/phpmyfaq
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-46367, inspect your project dependencies for phpMyFAQ has stored XSS via Utils:
inspect dependencies for thorsten/phpmyfaq
Analyze the terminal output to locate any version of phpMyFAQ has stored XSS via Utils in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In phpMyFAQ has stored XSS via Utils, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-46367 Affected phpMyFAQ has stored XSS via Utils Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
thorsten/phpmyfaq
|
Packagist |
≥ 4.1.1
< 4.1.2
All 1 versions
4.1.1
|
4.1.2
|
|
phpmyfaq/phpmyfaq
|
Packagist |
≥ 4.1.1
< 4.1.2
All 1 versions
4.1.1
|
4.1.2
|
References
Frequently Asked Questions
What is CVE-2026-46367?
Which phpMyFAQ has stored XSS via Utils versions are affected?
What version fixes CVE-2026-46367?
Is thorsten/phpmyfaq affected?
Is phpmyfaq/phpmyfaq affected?
What is the CVSS score of CVE-2026-46367?
What CWE is associated with CVE-2026-46367?
How can I check Packagist dependencies for CVE-2026-46367?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9525-27vj-c8r8",
"modified" : "2026-06-08T23:58:14Z",
"published" : "2026-05-06T20:10:48Z",
"aliases" : [ "CVE-2026-46367" ],
"summary" : "phpMyFAQ has stored XSS via Utils::parseUrl() in comment rendering",
"details" : "### Summary\n\nA 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.\n\n### Details\n\n`Utils::parseUrl()` (`phpmyfaq/src/phpMyFAQ/Utils.php`, line 281) converts URLs in comment text into clickable `<a>` tags at render time:\n\n $pattern = '/(https?:\\/\\/[^\\s]+)/i';\n $replacement = '<a href=\"$1\">$1</a>';\n return preg_replace($pattern, $replacement, $string);\n\nThe 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.\n\nThis 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.\n\nThe same sink exists in the admin comment panel (`admin/content/comments.twig`, lines 62 and 112), so admins viewing the panel are also affected.\n\nNo Content-Security-Policy headers are set anywhere in the app.\n\n### PoC\n\nRequirements:\n- main.enableCommentEditor = true (set in admin Configuration panel)\n- attacker has any registered user account\n- one FAQ entry with comments allowed exists\n\nSteps:\n1. Log in as a registered user and open a FAQ with comments.\n2. Submit the following as the comment text:\n\n https://www.evil.com/\"onmouseover=\"alert(document.cookie)\n\n (www. prefix required — parseUrl strips https:// then only re-adds\n it for www. URLs, which is what triggers the linkification)\n\n3. Any user who views that FAQ page and hovers the link triggers the\n payload. To hit an admin, wait for them to visit the page or check\n the admin comments panel at /admin/content/comments.\n\nResulting HTML in the page:\n\n <a href=\"https://www.evil.com/\"onmouseover=\"alert(document.cookie)\">\n ...\n </a>\n\nThe `\"` closes the href attribute; onmouseover becomes a real attribute.\n\n### Impact\n\nStored 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "thorsten/phpmyfaq"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.1"
}, {
"fixed" : "4.1.2"
} ]
} ],
"versions" : [ "4.1.1" ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "phpmyfaq/phpmyfaq"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.1"
}, {
"fixed" : "4.1.2"
} ]
} ],
"versions" : [ "4.1.1" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-9525-27vj-c8r8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-46367"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/thorsten/phpMyFAQ"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/phpmyfaq-stored-xss-via-utils-parseurl-in-comment-rendering"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116", "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-06T20:10:48Z",
"nvd_published_at" : null
}
}