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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| smarty-php | smarty | >= 4.0.0, < 4.3.1, < 3.1.48 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | smarty3 | 3.1.48-1 | — |
| Debian 14 | smarty4 | 4.3.1-1 | — |
| Debian 13 | smarty3 | 3.1.48-1 | — |
| Debian 13 | smarty4 | 4.3.1-1 | — |
| Debian 12 | smarty3 | 3.1.47-2+deb12u1 | DSA-5826-1 |
| Debian 12 | smarty4 | 4.3.0-1+deb12u1 | — |
| Debian 11 | smarty3 | 3.1.39-2+deb11u2 | DLA-3956-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
| Ubuntu 22.04 LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
| Ubuntu 20.04 LTS | smarty3 | 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1 | USN-7158-1 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | postfixadmin | 3.3.13-1ubuntu0.1~esm1 | — |
| Ubuntu Pro 22.04 LTS | civicrm | 5.33.2+dfsg1-1ubuntu1+esm1 | — |
| Ubuntu Pro 22.04 LTS | postfixadmin | 3.3.10-2ubuntu0.1~esm1 | USN-6550-1 |
| Ubuntu Pro 20.04 LTS | civicrm | 5.21.2+dfsg-1ubuntu0.1~esm1 | — |
| Ubuntu Pro 20.04 LTS | postfixadmin | 3.2.1-3ubuntu0.1~esm1 | USN-6550-1 |
| Ubuntu Pro 18.04 LTS | civicrm | 4.7.30+dfsg-1ubuntu1+esm1 | — |
| Ubuntu Pro 18.04 LTS | postfixadmin | 3.0.2-2ubuntu0.1~esm1 | USN-6550-1 |
| Ubuntu Pro 18.04 LTS | smarty3 | 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1 | USN-7158-1 |
| Ubuntu Pro 16.04 LTS | civicrm | 4.7.1+dfsg-2ubuntu1+esm1 | — |
| Ubuntu Pro 16.04 LTS | smarty3 | 3.1.21-1ubuntu1+esm2 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
drkbcn/lblfixer_cve_2023_28447 ★ 2 · Mar 30, 2023
Module for PrestaShop 1.7.X to fix CVE-2023-28447 vulnerability (Smarty XSS)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | smarty/smarty | >= 4.0.0, < 4.3.1 | 4.3.1 | GHSA-7j98-h7fp-4vwj |
| Packagist | smarty/smarty | < 3.1.48 | 3.1.48 | GHSA-7j98-h7fp-4vwj |
Advisories 5
- WID-SEC-2023-0849 MediaWiki: Mehrere Schwachstellen ermöglichen Codeausführung BSI CERT-Bund (WID) · May 19, 2026
- USN-7158-1 smarty3 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- USN-6550-1 postfixadmin vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-5826-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3956-1 smarty3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- https://github.com/smarty-php/smarty/security/advisories/GHSA-7j98-h7fp-4vwj
- https://github.com/smarty-php/smarty/commit/685662466f653597428966d75a661073104d713d
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HSAUM3YHWHO4UCJXRGRLQGPJAO3MFOZZ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JBB35GLYTL6JL6EOM6BOZNYP47JKNNHT/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P7O7SKTATM6GAP45S64QFXNLWIY5I7HP/