CVE-2014-8350: Smarty/smarty Smarty Arbitrary PHP Code Execution Vulnerability
HIGHCVE-2014-8350 is a HIGH smarty arbitrary php code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Smarty/smarty libraries in the Packagist ecosystem. The issue involves smarty arbitrary php code execution. Remediation is available by upgrading affected packages to version 3.1.21.
CVE-2014-8350 at a Glance
How to Fix CVE-2014-8350
To remediate this vulnerability, upgrade all affected Smarty/smarty dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade smarty/smarty to 3.1.21
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for smarty/smarty
How to Check if You Are Affected
To determine whether your application is affected by CVE-2014-8350, inspect your project dependencies for Smarty/smarty:
inspect dependencies for smarty/smarty
Analyze the terminal output to locate any version of Smarty/smarty in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.21), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Smarty/smarty, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2014-8350 Affected Smarty/smarty Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
smarty/smarty
|
Packagist |
< 3.1.21
|
3.1.21
|
References
Frequently Asked Questions
What is CVE-2014-8350?
Which Smarty/smarty versions are affected?
What version fixes CVE-2014-8350?
Is smarty/smarty affected?
What CWE is associated with CVE-2014-8350?
How can I check Packagist dependencies for CVE-2014-8350?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2pmx-6mm6-6v72",
"modified" : "2024-04-24T22:53:34Z",
"published" : "2022-05-17T01:13:38Z",
"aliases" : [ "CVE-2014-8350" ],
"summary" : "Smarty arbitrary PHP code execution",
"details" : "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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "smarty/smarty"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.21"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-8350"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765920"
}, {
"type" : "WEB",
"url" : "https://code.google.com/p/smarty-php/source/browse/trunk/distribution/change_log.txt?r=4902"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/97725"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/smarty-php/smarty"
}, {
"type" : "WEB",
"url" : "http://advisories.mageia.org/MGASA-2014-0468.html"
}, {
"type" : "WEB",
"url" : "http://seclists.org/oss-sec/2014/q4/420"
}, {
"type" : "WEB",
"url" : "http://seclists.org/oss-sec/2014/q4/421"
}, {
"type" : "WEB",
"url" : "http://www.mandriva.com/security/advisories?name=MDVSA-2014:221"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/70708"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-24T22:53:34Z",
"nvd_published_at" : "2014-11-03T16:55:00Z"
}
}