Path Traversal in smarty/smarty (CVE-2026-62996)
Summary
Path traversal in smarty/smarty (CVE-2026-62996). Risk of unauthorized operations or information disclosure. Exploitable via stream. Mitigation: upgrade to 5.8.4 or later.
Original description
The description as published by the source.
smarty/smarty version 5.8.0 can read local files through PHP stream wrappers even when Smarty Security is enabled and all streams are disabled with Security::$streams = null.
The bypass uses Smarty's built-in stream: resource type. A template such as:
{include file="stream:php://filter/read=convert.base64-encode/resource=/tmp/secret.tpl"}
is handled as Smarty resource type stream, so the security check that would normally reject the underlying php wrapper is not applied. StreamPlugin then opens the nested php://filter/... URI directly.
For comparison, the direct resource:
{include file="php://filter/read=convert.base64-encode/resource=/tmp/secret.tpl"}
is blocked with stream 'php' not allowed by security setting.
Affected package:
- Ecosystem: Packagist / Composer
- Package:
smarty/smarty - Confirmed affected version:
5.8.0 - Confirmed source reference from Composer lock:
78d259d3b971c59a0cd719c270cc5cbb740c36a7 - Current stable version on Packagist at review time:
v5.8.0 - Packagist usage at review time: 41,113,855 total downloads and 840,604 monthly downloads
Relevant code paths:
Smarty\Resource\BasePlugin::load(...)Smarty\Resource\StreamPlugin::getContent(...)Smarty\Security::isTrustedStream(...)
BasePlugin::load() maps the built-in resource name stream directly to StreamPlugin before the code path that checks PHP stream wrappers with stream_get_wrappers() and `Security::isTrustedStream(…
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-62996 has been found in smarty/smarty.
Attackers can target a specific entry point like stream over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade smarty/smarty to 5.8.4 or later.
If unsure, ask your IT team or search "smarty/smarty CVE-2026-62996" on the vendor's site.
CVE-2026-62996 (smarty/smarty) — CWE-22
Attack surface: stream / php / StreamPlugin / plain_dotdot_include
Patched: 5.8.4 — apply immediately
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. Attackers reach the vulnerable code path via stream.
Check the vendor advisory for the affected versions of smarty/smarty. Attack surface: stream / php / StreamPlugin / plain_dotdot_include.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 5.8.4.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
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 patch patch
Upgrade smarty/smarty to 5.8.4ステージング環境で 5.8.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-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
- Ubuntu UBUNTU-CVE-2026-62996 smarty3
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com