XSS (Cross-Site Scripting) dans thorsten/phpmyfaq (CVE-2026-56736)
Résumé
XSS dans thorsten/phpmyfaq (CVE-2026-56736). Des informations confidentielles peuvent être exposées. Exploitable via GET /admin/faq/edit/{faqId}/{lang}. Atténuation : mise à jour vers 4.2.0-alpha ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-56736 a été découverte dans thorsten/phpmyfaq.
Des attaquants peuvent cibler un point d'entrée spécifique comme GET /admin/faq/edit/{faqId}/{lang} à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées. Score CVSS : 8.2/10.
Action : mettez à jour thorsten/phpmyfaq vers 4.2.0-alpha ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « thorsten/phpmyfaq CVE-2026-56736 » sur le site de l'éditeur.
CVE-2026-56736 (thorsten/phpmyfaq) — CWE-79 / CVSS v3 8.2
Vecteur d'attaque : distant (réseau) / non authentifié
Surface d'attaque : GET /admin/faq/edit/{faqId}/{lang} / FILTER_SANITIZE_SPECIAL_CHARS / enableWysiwygEditorFrontend / true
Correctif : 4.2.0-alpha — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une XSS (CWE-79) affecte thorsten/phpmyfaq. Les attaquants atteignent le code vulnérable via GET /admin/faq/edit/{faqId}/{lang} sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de thorsten/phpmyfaq. Surface d'attaque : GET /admin/faq/edit/{faqId}/{lang} / FILTER_SANITIZE_SPECIAL_CHARS / enableWysiwygEditorFrontend / true.
Gravité : Élevée (CVSS 8.2/10). Des informations confidentielles peuvent être exposées.
Mettre à jour vers 4.2.0-alpha.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs webserver/proxy/WAF des requêtes anormales vers GET /admin/faq/edit/{faqId}/{lang} (en-têtes d'auth malformés, méta-caractères SQL). Auditez les fichiers de dépendances pour trouver thorsten/phpmyfaq.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
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 と同じログクエリでアラート再発が無いか継続監視。
Paquets affectés
Références
- web github.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com