Catégories
CVE-2026-35672 high CVSS 7.5

Vulnérabilité dans thorsten/phpmyfaq (CVE-2026-35672)

Résumé

Vulnérabilité dans thorsten/phpmyfaq (CVE-2026-35672). Les données peuvent être altérées par des attaquants. Exploitable via POST /api/v4.0/faq/create. Atténuation : mise à jour vers 4.1.3 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

Summary

A default empty API client token allows any unauthenticated user to create and modify FAQ entries, categories, and questions via the REST API. The vulnerability exists in all versions since API v4.0 was introduced because the installation process seeds api.apiClientToken with an empty string, and the hasValidToken() comparison logic cannot distinguish between "no token configured" and "attacker sent a matching empty token header."

Details

The root cause is in two files:

1. Installation default (src/phpMyFAQ/Setup/Installation/DefaultDataSeeder.php, line 277-278):

'api.enableAccess'   => 'true',
'api.apiClientToken' => '',       // ← defaults to empty string

2. Authentication check (src/phpMyFAQ/Controller/AbstractController.php, line 198-204):

protected function hasValidToken(): void
{
    $request = Request::createFromGlobals();
    if ($this->configuration->get('api.apiClientToken') !== $request->headers->get('x-pmf-token')) {
        throw new UnauthorizedHttpException('"x-pmf-token" is not valid.');
    }
}

The method uses strict inequality (!==). When api.apiClientToken is '' (default) and the attacker sends x-pmf-token: (empty header value), the comparison becomes '' !== '' which evaluates to false — no exception is thrown, and authentication is completely bypassed.

The OpenAPI annotations confirm the developer intended these endpoints to require authentication: write endpoints are tagged `'Endp…

Source: GitHub Security Advisories (Global) 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-35672 a été découverte dans thorsten/phpmyfaq.
Des attaquants peuvent cibler un point d'entrée spécifique comme POST /api/v4.0/faq/create à distance pour détourner le produit.
Les données peuvent être altérées par des attaquants. Score CVSS : 7.5/10.
Action : mettez à jour thorsten/phpmyfaq vers 4.1.3 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « thorsten/phpmyfaq CVE-2026-35672 » sur le site de l'éditeur.

CVE-2026-35672 (thorsten/phpmyfaq) — CWE-1188 / CVSS v3 7.5
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : POST /api/v4.0/faq/create / POST /api/v4.0/category / GET /api/v4.0/faqs/1 / api.apiClientToken
Correctif : 4.1.3 — 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.

❓ Quel est le problème

Une vulnérabilité (CWE-1188) affecte thorsten/phpmyfaq. Les attaquants atteignent le code vulnérable via POST /api/v4.0/faq/create sans authentification.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de thorsten/phpmyfaq. Surface d'attaque : POST /api/v4.0/faq/create / POST /api/v4.0/category / GET /api/v4.0/faqs/1 / api.apiClientToken.

🔥 Gravité

Gravité : Élevée (CVSS 7.5/10). Les données peuvent être altérées par des attaquants.

🔧 Comment corriger

Mettre à jour vers 4.1.3.

🛡️ Contournement

En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.

🔍 Détection

Recherchez dans les logs webserver/proxy/WAF des requêtes anormales vers POST /api/v4.0/faq/create (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

  1. 1
    Identify exposure identify
    grep -r 'thorsten/phpmyfaq' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で thorsten/phpmyfaq を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Hunt for indicators of compromise detect
    grep 'POST /api/v4.0/faq/create' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'

    アクセスログで POST /api/v4.0/faq/create への異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。

  3. 3
    Apply patch patch
    Upgrade thorsten/phpmyfaq to 4.1.3

    ステージング環境で 4.1.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。

  4. 4
    Post-deployment verification verify
    Replay attack against POST /api/v4.0/faq/create on staging to confirm patch closes the vector

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。

Paquets affectés

composer thorsten/phpmyfaq
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.3"}]}]
composer phpmyfaq/phpmyfaq
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.3"}]}]
Packagist thorsten/phpmyfaq
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.3"}]}]
Packagist phpmyfaq/phpmyfaq
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.1.3"}]}]

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus