Traversée de chemin dans smarty/smarty (CVE-2026-62992)
Résumé
Traversée de chemin dans smarty/smarty (CVE-2026-62992). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 5.8.2 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
When Smarty's Security policy is enabled, secure_dir (and the configured template/trusted directories) restrict which local files a template may read via {include} and {fetch}. The trust check in Security::_checkDir() resolved the requested path with Smarty::_realpath(), which normalizes the path as a string only and does not follow symbolic links. A symlink placed inside a trusted directory therefore passed the trust check, while the underlying file_get_contents() followed it to an arbitrary file outside the sandbox (e.g. /etc/passwd).
Impact
An attacker able to (a) cause a symlink to exist inside a trusted directory (e.g. a user-upload area located within the template path) and (b) cause a template to reference that path can read arbitrary files readable by the PHP process, escaping the secure_dir boundary. Confidentiality impact only.
Patches
Fixed in 5.8.2. Security::_checkDir() now resolves the requested file with native realpath() and re-validates the canonical, symlink-free path against the trusted directories (which are canonicalized the same way, so legitimate symlinked deployment paths such as a Capistrano current symlink or macOS /var → /private/var keep working). It falls back to string normalization only when the file does not yet exist on disk.
Workarounds
Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only.
Ref…
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-62992 a été découverte dans smarty/smarty.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour smarty/smarty vers 5.8.2 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « smarty/smarty CVE-2026-62992 » sur le site de l'éditeur.
CVE-2026-62992 (smarty/smarty) — CWE-22
Correctif : 5.8.2 — appliquer immédiatement
Contournement : Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only.
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 traversée de chemin (CWE-22) affecte smarty/smarty.
Consultez l'avis de l'éditeur pour les versions affectées de smarty/smarty.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 5.8.2.
Contournement : Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
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 'smarty/smarty' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
smarty/smartyを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only.パッチが適用されるまでの応急処置として、Ensure no untrusted symlinks can be created within any directory listed in secure_dir/the trusted template directories; restrict write access to those directories to trusted processes only. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade smarty/smarty to 5.8.2ステージング環境で 5.8.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com