Security Vulnerability Report
中文
CVE-2026-46361 CVSS 6.9 MEDIUM

CVE-2026-46361

Published: 2026-05-15 19:17:03
Last Modified: 2026-05-16 02:16:16

Description

phpMyFAQ before 4.1.2 contains a stored cross-site scripting vulnerability in search.twig where result.question and result.answerPreview are rendered with the raw filter, disabling autoescape protection. Attackers with FAQ editor privileges can inject HTML-entity-encoded payloads that bypass html_entity_decode(strip_tags()) processing in SearchController.php, executing arbitrary JavaScript in every visitor's browser context including administrators.

CVSS Details

CVSS Score
6.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N

Configurations (Affected Products)

No configuration data available.

phpMyFAQ < 4.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- PoC Concept: 1. Attacker logs in as an FAQ Editor. 2. Creates or edits a FAQ entry. 3. Injects the following payload into the 'Question' or 'Answer' field. The payload uses HTML entities to bypass strip_tags(), which is later decoded and rendered unsafely via |raw. --> &lt;img src=x onerror=alert(document.cookie)&gt; <!-- Explanation: - &lt; represents < - &gt; represents > - strip_tags() sees "&lt;...&gt;" as text and allows it. - html_entity_decode() converts it back to "<img...>". - Twig |raw filter outputs it directly, executing the JS. -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-46361", "sourceIdentifier": "[email protected]", "published": "2026-05-15T19:17:03.400", "lastModified": "2026-05-16T02:16:15.593", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "phpMyFAQ before 4.1.2 contains a stored cross-site scripting vulnerability in search.twig where result.question and result.answerPreview are rendered with the raw filter, disabling autoescape protection. Attackers with FAQ editor privileges can inject HTML-entity-encoded payloads that bypass html_entity_decode(strip_tags()) processing in SearchController.php, executing arbitrary JavaScript in every visitor's browser context including administrators."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:L/A:N", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.7, "impactScore": 4.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-pqh6-8fxf-jx22", "source": "[email protected]"}, {"url": "https://www.vulncheck.com/advisories/phpmyfaq-stored-cross-site-scripting-via-raw-filter-in-search-twig", "source": "[email protected]"}, {"url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-pqh6-8fxf-jx22", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}