Description
The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22 allows context-dependent attackers to execute arbitrary commands via shell metacharacters in the equation attribute of the math function. NOTE: some of these details are obtained from third party information.
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 5.0 | smarty | 2.6.20-1.2 | DSA-1919-1 |
| Debian 4.0 | smarty | 2.6.14-1etch2 | DSA-1919-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Bitweaver 2.6 - 'saveFeed()' Remote Code Execution EDB-8659 · webapps · May 12, 2009 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-1919-1 smarty - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- smarty-smartyfunctionmath-cmd-execution(50457) vdb-entry
- 35072 third-party-advisory
- USN-791-3 vendor-advisory
- 54380 vdb-entry
- 8659 exploit
- FEDORA-2009-5520 vendor-advisory
- FEDORA-2009-5516 vendor-advisory
- 35219 third-party-advisory
- FEDORA-2009-5525 vendor-advisory
- 34918 vdb-entry