Skip to content
OpenAdvisories
High · 7.1 Public exploit CVE-2023-28447 EUVD-2023-0924GHSA-7j98-h7fp-4vwj

Cross site scripting vulnerability in Javascript escaping in smarty/smarty

Published Mar 28, 2023 · Updated Nov 3, 2025 · Assigned by GitHub_M

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
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

References