Description
Smarty 3 before 3.1.32 is vulnerable to a PHP code injection when calling fetch() or display() functions on custom resources that does not sanitize template name.
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.31+20161214.1.c7d42e4+selfpack1-3 | — |
| Debian 13 | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3 | — |
| Debian 12 | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3 | — |
| Debian 9 | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u1 | DSA-4094-1 |
| Debian 8 | smarty3 | 3.1.21-1+deb8u1 | DSA-4094-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 7 | smarty3 | 3.1.10-2+deb7u2 | DLA-1249-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | smarty3 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | >= 3, < 3.1.32 | 3.1.32 | GHSA-9m49-vhwv-422g |
Advisories 2
- DSA-4094-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1249-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026