Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

BID:46366

Info

Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

Bugtraq ID: 46366
Class: Input Validation Error
CVE:
Remote: Yes
Local: No
Published: Feb 09 2011 12:00AM
Updated: Feb 09 2011 12:00AM
Credit: jonieske
Vulnerable: Smarty Template Engine 2.6.9
Smarty Template Engine 2.6.8
Smarty Template Engine 2.6.7
+ Gentoo Linux
Smarty Template Engine 2.6.6
Smarty Template Engine 2.6.5
Smarty Template Engine 2.6.4
Smarty Template Engine 2.6.3
Smarty Template Engine 3.0.6
Not Vulnerable: Smarty Template Engine 3.0.7

Discussion

Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

Smarty Template Engine is prone to a remote PHP code-injection vulnerability.

An attacker can exploit this issue to inject and execute arbitrary PHP code in the context of the webserver process. This may facilitate a compromise of the application and the underlying system; other attacks are also possible.

Versions prior to Smarty Template Engine 3.0.7 are vulnerable.

Exploit / POC

Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

Attackers can exploit this issue via a browser.

The following example input is available:

$smarty.template : '.(include 'hack.php').'.tpl

Solution / Fix

Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

Solution:
Updates are available. Please see the references for more details.

References

Smarty Template Engine '$smarty.template' PHP Code Injection Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report