Vulnerability · Published Aug 7, 2026 · Assigned by GitHub_M
CVE-2026-62996Smarty Security stream restriction bypass through stream: resource
Medium 6.9
In plain English
A medium-severity path traversal in smarty from smarty-php. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | smarty/smarty | 5.8.4 | GHSA-rjhh-76wf-8xmw |
| Ubuntu:22.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:24.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:26.04:LTS | smarty3 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:26.10 | smarty3 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:24.04:LTS | smarty4 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:26.04:LTS | smarty4 | no fix listed | UBUNTU-CVE-2026-62996 |
| Ubuntu:26.10 | smarty4 | no fix listed | UBUNTU-CVE-2026-62996 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| smarty-php | smarty | >= 5.0.0, < 5.8.4 |
Weakness: CWE-22 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/smarty-php/smarty/security/advisories/GHSA-rjhh-76wf-8xmw x_refsource_CONFIRM
- https://github.com/smarty-php/smarty/pull/1195 x_refsource_MISC
- https://github.com/smarty-php/smarty/commit/3c9f77a2e06ce319ae0092496af32cc8f3adc52e x_refsource_MISC
- https://github.com/smarty-php/smarty/releases/tag/v5.8.4 x_refsource_MISC