Description
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. In affected versions template authors could inject php code by choosing a malicious file name for an extends-tag. Sites that cannot fully trust template authors should update asap. All users are advised to update. There is no patch for users on the v3 branch. There are no known workarounds for this vulnerability.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| smarty-php | smarty | >= 5.0.0, < 5.1.1, >= 3.0.0, < 4.5.3 | — |
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | smarty3 | 3.1.48-2 | — |
| Debian 14 | smarty4 | 4.5.4-1 | — |
| Debian 13 | smarty3 | 3.1.48-2 | — |
| Debian 13 | smarty4 | 4.5.4-1 | — |
| Debian 12 | smarty3 | 3.1.47-2+deb12u1 | DSA-5826-1 |
| Debian 12 | smarty4 | 4.3.0-1+deb12u2 | DSA-5830-1 |
| Debian 11 | smarty3 | 3.1.39-2+deb11u2 | DLA-3956-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | smarty3 | No fix yet | — |
| Ubuntu 26.04 LTS | smarty3 | No fix yet | — |
| Ubuntu 25.10 | smarty3 | No fix yet | — |
| Ubuntu 24.04 LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
| Ubuntu 24.04 LTS | smarty4 | 4.3.1-1ubuntu0.24.04.1 | USN-7377-1 |
| Ubuntu 22.04 LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | smarty3 | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | USN-7158-1 |
| Ubuntu Pro 18.04 LTS | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | USN-7158-1 |
| Ubuntu Pro 16.04 LTS | smarty3 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | >= 5.0.0, < 5.1.1 | 5.1.1 | GHSA-4rmg-292m-wg3w |
| Packagist | smarty/smarty | >= 3.0.0, < 4.5.3 | 4.5.3 | GHSA-4rmg-292m-wg3w |
Advisories 6
- USN-7377-1 smarty vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- USN-7158-1 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-5826-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-5830-1 smarty4 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3956-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- WID-SEC-2024-3087 MediaWiki: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 19, 2025