Cross-Site Scripting (XSS) in thorsten/phpmyfaq (CVE-2026-56736)
Summary
Cross-site scripting in thorsten/phpmyfaq (CVE-2026-56736). Confidential information can be exposed externally. Exploitable via GET /admin/faq/edit/{faqId}/{lang}. Mitigation: upgrade to 4.2.0-alpha or later.
Original description
The description as published by the source.
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)
$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., ``) — 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 codebase) i…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-56736 has been found in thorsten/phpmyfaq.
Attackers can target a specific entry point like GET /admin/faq/edit/{faqId}/{lang} over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 8.2/10.
What to do: upgrade thorsten/phpmyfaq to 4.2.0-alpha or later.
If unsure, ask your IT team or search "thorsten/phpmyfaq CVE-2026-56736" on the vendor's site.
CVE-2026-56736 (thorsten/phpmyfaq) — CWE-79 / CVSS v3 8.2
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: GET /admin/faq/edit/{faqId}/{lang} / FILTER_SANITIZE_SPECIAL_CHARS / enableWysiwygEditorFrontend / true
Patched: 4.2.0-alpha — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in thorsten/phpmyfaq. Attackers reach the vulnerable code path via GET /admin/faq/edit/{faqId}/{lang} without authentication.
Check the vendor advisory for the affected versions of thorsten/phpmyfaq. Attack surface: GET /admin/faq/edit/{faqId}/{lang} / FILTER_SANITIZE_SPECIAL_CHARS / enableWysiwygEditorFrontend / true.
Severity: High (CVSS 8.2/10). Confidential information can be exposed externally.
Update to 4.2.0-alpha.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual GET /admin/faq/edit/{faqId}/{lang} requests with malformed payloads or SQL meta-characters. Run grep -r 'thorsten/phpmyfaq' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'thorsten/phpmyfaq' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
thorsten/phpmyfaqを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'GET /admin/faq/edit/{faqId}/{lang}' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
GET /admin/faq/edit/{faqId}/{lang}への異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade thorsten/phpmyfaq to 4.2.0-alphaステージング環境で 4.2.0-alpha に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against GET /admin/faq/edit/{faqId}/{lang} on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com