Sandbox escape through template_object in smarty
Sandbox protection could be bypassed through access to an internal Smarty object that should have been blocked. Sites that rely on Smarty Security features should upgrade as soon as possible. Please upgrade to 3.1.39 or higher.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | smarty/smarty | < 3.1.39 | 3.1.39 |
References
- https://github.com/smarty-php/smarty/security/advisories/GHSA-w5hr-jm4j-9jvq
- https://nvd.nist.gov/vuln/detail/CVE-2021-26119
- https://github.com/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2021-26119.yaml
- https://github.com/smarty-php/smarty
- https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md
- https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html
- https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html
- https://security.gentoo.org/glsa/202105-06
- https://srcincite.io/blog/2021/02/18/smarty-template-engine-multiple-sandbox-escape-vulnerabilities.html
- https://www.debian.org/security/2022/dsa-5151
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N- Weakness (CWE)
-- Platform
- Composer
- Package
smarty/smarty- Disclosed
- 02.03.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-w5hr-jm4j-9jvq - CC BY 4.0
Vulnerability history: smarty/smarty
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 18
- First → latest
- 02.2021 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 8
- Medium 7
Disclosures per year
- 2021: 2
- 2022: 11
- 2023: 1
- 2024: 1
- 2025: 0
- 2026: 3
-
Sandbox escape through template_object in smarty this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.