CVE-2026-56736
phpMyFAQ has Stored XSS in Admin FAQ Editor via HTML Entity Bypass in Frontend FAQ Submission
Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-10-24; check the references for anything newer.
- Severity: High
- CVSS 8.2
- EPSS 0.24%
- Public exploit
- P2 · This week
Why P2: this week.
Description
### Summary A stored cross-site scripting (XSS) vulnerability in phpMyFAQ allows any unauthenticated user (or low-privileged registered user) to inject arbitrary JavaScript that executes in an administrator's browser when they review or edit a user-submitted FAQ entry. This leads to admin account takeover via session theft. The vulnerability exists because `html_entity_decode()` converts HTML entities into executable HTML after `strip_tags()` has already passed them through, and the admin template renders the content with Twig's `|raw` filter without any output sanitization. ### Details **Vulnerable file:** `phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/FaqController.php` (lines 109-115) ```php $answer = Filter::filterVar($data->answer, FILTER_SANITIZE_SPECIAL_CHARS); if ($this->configuration->get(item: 'main.enableWysiwygEditorFrontend')) { $answer = trim(html_entity_decode((string) $answer)); } ``` **Root cause:** `Filter::filterVar()` with `FILTER_SANITIZE_SPECIAL_CHARS` internally calls `filterSanitizeString()` which applies `strip_tags()` to remove HTML tags. However, `strip_tags()` only removes **actual HTML tag syntax** (e.g., `<script>`) — it does NOT remove **HTML entities** (e.g., `<script>`). When `enableWysiwygEditorFrontend` is `true`, `html_entity_decode()` is subsequently called, which converts the surviving HTML entities into real, executable HTML. No server-side HTML sanitizer (such as the Symfony HtmlSanitizer already used elsewhere in the co…
Affected products
- composer phpmyfaq/phpmyfaq < 4.2.0-alpha; first patched: 4.2.0-alpha
- composer thorsten/phpmyfaq < 4.2.0-alpha; first patched: 4.2.0-alpha
References
- GitHub security advisory GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub