Catégories
CVE-2026-62992

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.

❓ Quel est le problème

Une traversée de chemin (CWE-22) affecte smarty/smarty.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de smarty/smarty.

🔥 Gravité

Gravité : ?. Risque d'opérations non autorisées ou de divulgation.

🔧 Comment corriger

Mettre à jour vers 5.8.2.

🛡️ Contournement

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.

🔍 Détection

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

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

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

  2. 2
    Apply 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. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade smarty/smarty to 5.8.2

    ステージング環境で 5.8.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

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

Paquets affectés

composer smarty/smarty
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5.7"}]}]
Packagist smarty/smarty
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5.7"}]}]

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