CVE-2026-62996 Details
Description
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.
A security vulnerability in the Smarty template engine for PHP, affecting versions 5.0.0 prior to 5.8.4, allows for unauthorized access to local files through PHP stream wrappers. This issue arises because Smarty's handling of the 'stream:' resource type does not properly validate which stream wrappers can be used in templates. As a result, an attacker could exploit this flaw to read sensitive file contents by wrapping the file path in a php://filter stream, bypassing Smarty's security restrictions and the normal checks that prevent directory traversal.
Users can upgrade to Smarty version 5.8.4 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 7, 2026CISA-ADP
Assessed Aug 7, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/smarty-php/smarty/security/advisories/GHSA-rjhh-76wf-8xmw | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/smarty-php/smarty/commit/3c9f77a2e06ce319ae0092496af32cc8f3adc52e | [email protected] | Source CodeVendor |
| https://github.com/smarty-php/smarty/pull/1195 | [email protected] | Issue TrackingVendor |
| https://github.com/smarty-php/smarty/releases/tag/v5.8.4 | [email protected] | Release NotesVendor |
| https://github.com/smarty-php/smarty/security/advisories/GHSA-rjhh-76wf-8xmw | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Smarty | >= 5.0.0, < 5.8.4 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 7, 2026 | CVE Modified | CISA-ADP |
| Aug 7, 2026 | New CVE Received | [email protected] |
Volerion