Smarty Security stream restriction bypass through stream: resource
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-22 and the CVSS impact.
Summary
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. From 5.0.0 until 5.8.4, Smarty's stream: resource-name handling does not adequately restrict which PHP stream wrappers and filter chains can be referenced from a template, allowing a php://filter-wrapped resource name to be used to read the contents of arbitrary local files accessible to the PHP process. An attacker able to author or influence a template's resource reference could exploit this to disclose sensitive file contents outside the intended template/config scope. This issue is fixed in version 5.8.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| smarty-php | smarty | 5.0.0 to before 5.8.4 | 5.8.4 | Patch available | CNA |
| — | smarty/smarty (Packagist) | 5.0.0 to before 5.8.4 | 5.8.4 | Patch available | GHSA-rjhh-76wf-8xmw |
- smarty Vendorsmarty-php Affected 5.0.0 to before 5.8.4 Fixed in 5.8.4 Patch available CNA
- smarty/smarty (Packagist) Vendor— Affected 5.0.0 to before 5.8.4 Fixed in 5.8.4 Patch available GHSA-rjhh-76wf-8xmw
Remediation
- Fix · CNA smarty (smarty-php) Fixed in 5.8.4
- Fix · GHSA-rjhh-76wf-8xmw smarty/smarty (Packagist) Fixed in 5.8.4 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-62996
- 2026-10-03 Alias added: GHSA-rjhh-76wf-8xmw
References
Other 5
More smarty-php vulnerabilities
- TI-2021-08070 Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. CVSS 3.1CRITICAL 9.8
- TI-2026-68416 Code injection in Smarty via extends: inheritance cache CVSS 4.0CRITICAL 9.2
- TI-2009-01585 The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22… CVSS 2.0HIGH 10.0
- TI-2006-06846 PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows… CVSS 3.1CRITICAL 9.8
- TI-2022-11764 PHP Code Injection by malicious block or filename in Smarty CVSS 3.1HIGH 8.8
- TI-2017-14689 Smarty 3 before 3.1.32 is vulnerable to a PHP code injection when calling fetch() or… CVSS 3.0CRITICAL 9.8
Sources
- CVE-2026-62996 · CVE Program
- CVE-2026-62996 · NVD
- FIRST EPSS
- GHSA-rjhh-76wf-8xmw · GitHub Advisory Database · CC BY 4.0
- CVE-2026-62996 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences