CVE-2012-4437 — smarty
CVE-2012-4437 is a Cross-site Scripting (XSS) vulnerability in smarty/smarty. A fix is available for smarty/smarty — see the affected versions and patch details below.
Cross-site Scripting in SmartyException
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
smarty/smartyReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | smarty/smarty | all versions | 3.1.12composer require smarty/smarty:^3.1.12 |
Affected Products
smartysmartyDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for smarty/smarty, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update smarty/smarty to 3.1.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2012-4437 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2012-4437 in your dependencies?
Find it across Packagist, including transitive dependencies.