Path Traversal in smarty/smarty (CVE-2026-62992)
Summary
Path traversal in smarty/smarty (CVE-2026-62992). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 5.8.2 or later.
Original description
The description as published by the source.
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
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-62992 has been found in smarty/smarty.
Risk of unauthorized operations or information disclosure.
What to do: upgrade smarty/smarty to 5.8.2 or later.
If unsure, ask your IT team or search "smarty/smarty CVE-2026-62992" on the vendor's site.
CVE-2026-62992 (smarty/smarty) — CWE-22
Patched: 5.8.2 — apply immediately
Workaround: 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/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in smarty/smarty.
Check the vendor advisory for the affected versions of smarty/smarty.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 5.8.2.
Workaround: 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.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'smarty/smarty' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
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 でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-62992 smarty3
- Ubuntu UBUNTU-CVE-2026-62992 smarty3
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com