CVE-2012-4437: Smarty/smarty Cross-Site Scripting Vulnerability
MODERATECVE-2012-4437 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Smarty/smarty libraries in the Packagist ecosystem. The issue involves cross-site scripting in smartyexception. Remediation is available by upgrading affected packages to version 3.1.12.
CVE-2012-4437 at a Glance
How to Fix CVE-2012-4437
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.12
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-2012-4437, 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.12), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-2012-4437 Affected Smarty/smarty Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
smarty/smarty
|
Packagist |
< 3.1.12
|
3.1.12
|
References
Frequently Asked Questions
What is CVE-2012-4437?
Which Smarty/smarty versions are affected?
What version fixes CVE-2012-4437?
Is smarty/smarty affected?
What CWE is associated with CVE-2012-4437?
How can I check Packagist dependencies for CVE-2012-4437?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9gqj-ppv2-f2hq",
"modified" : "2023-08-29T21:35:11Z",
"published" : "2022-05-17T04:02:12Z",
"aliases" : [ "CVE-2012-4437" ],
"summary" : "Cross-site Scripting in SmartyException",
"details" : "Cross-site scripting (XSS) vulnerability in the `SmartyException` class in Smarty (aka smarty-php) before 3.1.12 allows remote attackers to inject arbitrary web script or HTML via unspecified vectors that trigger a Smarty exception.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "smarty/smarty"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.12"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-4437"
}, {
"type" : "WEB",
"url" : "https://code.google.com/p/smarty-php/source/browse/trunk/distribution/change_log.txt"
}, {
"type" : "WEB",
"url" : "https://code.google.com/p/smarty-php/source/detail?r=4658"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/smarty-php/smarty"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/pipermail/package-announce/2012-September/088138.html"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20140201075419/http://www.securityfocus.com/bid/55506"
}, {
"type" : "WEB",
"url" : "https://www.openwall.com/lists/oss-security/2012/09/19/1"
}, {
"type" : "WEB",
"url" : "https://www.openwall.com/lists/oss-security/2012/09/20/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-29T21:35:11Z",
"nvd_published_at" : "2012-10-01T03:26:00Z"
}
}