CVE-2023-28447: smarty · Cross-site Scripting
Affects smartySource CVE Database V5
Not known to be exploited · CVSS 7.1 High : upgrade to 3.1.48 soon.
Data as of 26 Oct 2026, 10:12 UTC
- EPSS
- 1.0% chance of exploitation in 30 days – higher than 63% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.1.48
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:LExploitation evidence
Disclosed: evidence found.
CVE published 28 Mar 2023
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade smarty-php/smarty to 3.1.48.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Packagistsmarty-php/smartypkg:composer/smarty-php/smartyOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The primary and most effective mitigation is to upgrade Smarty to version 3.1.48 or 4.3.1, where the vulnerability has been patched. Organizations should audit their web applications to identify all instances of Smarty usage and verify the versions in deployment. Where immediate upgrading is not feasible, developers should review template code to ensure proper escaping of all user-supplied input, particularly within JavaScript contexts, although this is a complex and error-prone approach. Implementing Content Security Policy (CSP) headers can help mitigate the impact of XSS by restricting the execution of unauthorized scripts. Web Application Firewalls (WAFs) configured to detect and block XSS payloads may provide temporary protection but should not be relied upon as a sole defense. Regular security testing, including automated scanning and manual code reviews focusing on template rendering, should be conducted. User education to recognize phishing attempts and suspicious links can reduce the risk of exploitation. Finally, monitoring web application logs for unusual activity or script injection attempts can help detect exploitation attempts early.
Description
Smarty is a template engine for PHP. In affected versions smarty did not properly escape javascript code. An attacker could exploit this vulnerability to execute arbitrary JavaScript code in the context of the user's browser session. This may lead to unauthorized access to sensitive user data, manipulation of the web application's behavior, or unauthorized actions performed on behalf of the user. Users are advised to upgrade to either version 3.1.48 or to 4.3.1 to resolve this issue. There are no known workarounds for this vulnerability.
References
- github.com/smarty-php/smarty/security/advisories/GHSA-7j98-h7fp-4vwj (opens in a new tab)
- github.com/smarty-php/smarty/commit/685662466f653597428966d75a661073104d713d (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HSAUM3YHWHO4UCJXRGRLQGPJAO3MFOZZ/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JBB35GLYTL6JL6EOM6BOZNYP47JKNNHT/ (opens in a new tab)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P7O7SKTATM6GAP45S64QFXNLWIY5I7HP/ (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/11/msg00013.html (opens in a new tab)