Read the docs
TI-2023-12991 Aliases CVE-2023-28447GHSA-7j98-h7fp-4vwj

Cross site scripting vulnerability in Javascript escaping in smarty/smarty

Priority LOW 33CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · Low
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

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.

Why it matters now

EPSS 0.01016 63rd percentileScored 2026-11-08
Fix Fixed smarty (smarty-php): 4.3.1, 3.1.48smarty/smarty (Packagist): 4.3.1, 3.1.48

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
smarty-phpsmarty4.0.0 to before 4.3.1; before 3.1.484.3.1, 3.1.48Patch availableCNA
—smarty/smarty (Packagist)4.0.0 to before 4.3.14.3.1Patch availableGHSA-7j98-h7fp-4vwj
—smarty/smarty (Packagist)before 3.1.483.1.48Patch availableGHSA-7j98-h7fp-4vwj
  • smarty Vendorsmarty-php Affected 4.0.0 to before 4.3.1; before 3.1.48 Fixed in 4.3.1, 3.1.48 Patch available CNA
  • smarty/smarty (Packagist) Vendor— Affected 4.0.0 to before 4.3.1 Fixed in 4.3.1 Patch available GHSA-7j98-h7fp-4vwj
  • smarty/smarty (Packagist) Vendor— Affected before 3.1.48 Fixed in 3.1.48 Patch available GHSA-7j98-h7fp-4vwj

CPE configurations NVD · 4

CPEVersionsRoleVendor
cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*before 3.1.48; 4.0.0 to before 4.3.1Vulnerablesmarty-php
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*37VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*38VulnerableFedoraproject
  • cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:* Versions before 3.1.48; 4.0.0 to before 4.3.1 Vulnerable ·smarty-php
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* Versions 38 Vulnerable ·Fedoraproject

Remediation

  • Fix · CNA smarty (smarty-php) Fixed in 4.3.1, 3.1.48
  • Fix · GHSA-7j98-h7fp-4vwj smarty/smarty (Packagist) Fixed in 4.3.1 Advisory →
  • Fix · GHSA-7j98-h7fp-4vwj smarty/smarty (Packagist) Fixed in 3.1.48 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-28447
  2. 2026-10-03 Alias added: GHSA-7j98-h7fp-4vwj

References

  • TI-2021-08070 Smarty before 3.1.39 allows code injection via an unexpected function name after a {function name= substring. CVSS 3.1CRITICAL 9.8
  • TI-2009-01585 The smarty_function_math function in libs/plugins/function.math.php in Smarty 2.6.22… CVSS 2.0HIGH 10.0
  • TI-2006-06846 PHP remote file inclusion vulnerability in libs/Smarty.class.php in Smarty 2.6.9 allows… CVSS 3.1CRITICAL 9.8
  • TI-2022-11764 PHP Code Injection by malicious block or filename in Smarty CVSS 3.1HIGH 8.8
  • TI-2017-14689 Smarty 3 before 3.1.32 is vulnerable to a PHP code injection when calling fetch() or… CVSS 3.0CRITICAL 9.8
  • TI-2010-04450 Smarty before 3.0.0 beta 7 does not properly handle the <?php and ?> tags, which has… CVSS 2.0HIGH 10.0
See all 30 →

Sources