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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| smarty-php | smarty | >= 5.0.0, < 5.8.4 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | smarty3 +1 | No fix yet | — |
| Ubuntu 26.04 LTS | smarty3 +1 | No fix yet | — |
| Ubuntu 24.04 LTS | smarty3 +1 | No fix yet | — |
| Ubuntu 22.04 LTS | smarty3 | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | smarty3 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | smarty3 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | smarty3 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | >= 5.0.0, < 5.8.4 | 5.8.4 | GHSA-rjhh-76wf-8xmw |