Description
Smarty before 3.1.39 allows a Sandbox Escape because $smarty.template_object can be accessed in sandbox mode.
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.39-1 | — |
| Debian 13 | smarty3 | 3.1.39-1 | — |
| Debian 12 | smarty3 | 3.1.39-1 | — |
| Debian 9 | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u2 | DLA-2618-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1 | USN-5348-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | smarty3 | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1 | USN-5348-3 |
| Ubuntu Pro 16.04 LTS | smarty3 | 3.1.21-1ubuntu1+esm1 | USN-5348-2 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | < 3.1.39 | 3.1.39 | GHSA-w5hr-jm4j-9jvq |
Advisories 4
- USN-5348-2 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DLA-2618-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-5348-1 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Feb 10, 2026
- USN-5348-3 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Feb 10, 2026
References
- https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md
- [debian-lts-announce] 20210405 [SECURITY] [DLA 2618-1] smarty3 security update mailing-list
- [debian-lts-announce] 20210416 [SECURITY] [DLA 2618-2] smarty3 regression update mailing-list
- GLSA-202105-06 vendor-advisory
- DSA-5151 vendor-advisory