Description
Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as demonstrated by "{literal}<{/literal}script language=php>" in a template.
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.21-1 | — |
| Debian 13 | smarty3 | 3.1.21-1 | — |
| Debian 12 | smarty3 | 3.1.21-1 | — |
| Debian 7 | smarty3 | 3.1.10-2+deb7u1 | DLA-452-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | < 3.1.21 | 3.1.21 | GHSA-2pmx-6mm6-6v72 |
Advisories 1
- DLA-452-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- 70708 vdb-entry
- [oss-security] 20141023 Re: CVE Request: smarty: secure mode bypass mailing-list
- https://code.google.com/p/smarty-php/source/browse/trunk/distribution/change_log.txt?r=4902
- http://advisories.mageia.org/MGASA-2014-0468.html
- [oss-security] 20141022 CVE Request: smarty: secure mode bypass mailing-list
- MDVSA-2014:221 vendor-advisory
- smarty-cve20148350-code-exec(97725) vdb-entry
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765920