Injection de code dans getgrav/grav (CVE-2026-72819)
Résumé
Injection de code dans getgrav/grav (CVE-2026-72819). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via PATCH /api/v1/config/plugins/flex-objects. Atténuation : mise à jour vers 2.0.13 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
A logged-in user can run any command on the server. A settings field can fill itself by calling one of Grav's built-in routines, and a safety check is supposed to allow only harmless ones. The check only recognises a routine when its name is written as one piece of text; named as a pair of values instead, it is not examined at all and is passed as safe. Pointing such a field at the routine that unpacks ZIP archives writes a PHP file from an uploaded archive into the site's public folder, which the server then runs.
Details
The check rejects known-dangerous routines and, for those belonging to a component, allows only a short approved list. Both of those cases only apply when the name arrives as a single string. The same routine can be named as a pair (the component and the routine inside it), and in that form the check matches neither case, skips both lists and answers "safe". Grav then calls it, with arguments the attacker supplies in the same field. Any routine shipped with Grav becomes callable.
The one used here is what Grav runs when installing a plugin from an archive. It takes an archive and a destination folder. It does check the names of the files inside, so an archive cannot escape with ../, but the destination is used exactly as given, so naming the folder the website is served from drops the contents there. Getting the archive in is trivial: ZIP is an accepted upload type and the files inside are never examined, so an archive containing a PHP…
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-72819 a été découverte dans getgrav/grav.
Des attaquants peuvent cibler un point d'entrée spécifique comme PATCH /api/v1/config/plugins/flex-objects à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système. Score CVSS : 8.8/10.
Action : mettez à jour getgrav/grav vers 2.0.13 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « getgrav/grav CVE-2026-72819 » sur le site de l'éditeur.
CVE-2026-72819 (getgrav/grav) — CWE-94 / CVSS v3 8.8
Vecteur d'attaque : distant (réseau) / sans interaction utilisateur
Surface d'attaque : PATCH /api/v1/config/plugins/flex-objects / POST /api/v1/flex-objects/flex-objects
Correctif : 2.0.13 — 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 exécution de code arbitraire (CWE-94) affecte getgrav/grav. Les attaquants atteignent le code vulnérable via PATCH /api/v1/config/plugins/flex-objects.
Consultez l'avis de l'éditeur pour les versions affectées de getgrav/grav. Surface d'attaque : PATCH /api/v1/config/plugins/flex-objects / POST /api/v1/flex-objects/flex-objects.
Gravité : Élevée (CVSS 8.8/10). L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 2.0.13.
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 PATCH /api/v1/config/plugins/flex-objects (en-têtes d'auth malformés, méta-caractères SQL). Auditez les fichiers de dépendances pour trouver getgrav/grav.
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 'getgrav/grav' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
getgrav/gravを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'PATCH /api/v1/config/plugins/flex-objects' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
PATCH /api/v1/config/plugins/flex-objectsへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply patch patch
Upgrade getgrav/grav to 2.0.13ステージング環境で 2.0.13 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
4Post-deployment verification verify
Replay attack against PATCH /api/v1/config/plugins/flex-objects 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 disclosure@vulncheck.com
- web github.com
- web github.com