Skip to main content
VulnerabilityPublished Updated

CVE-2023-28447: smarty · Cross-site Scripting

Affects smartySource CVE Database V5

0

Not known to be exploited · CVSS 7.1 High : upgrade to 3.1.48 soon.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 3.1 base score
7.1High
How severe the flaw is on the 0–10 CVSS scale.
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:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 28 Mar 2023

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Packagistsmarty-php/smartypkg:composer/smarty-php/smartyOther threatsAffected
  • <3.1.48
Fixed in
  • 3.1.48

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

Community reviews

Loading reviews…