Vulnerability · Published Mar 28, 2023 · Assigned by GitHub_M
CVE-2023-28447Cross site scripting vulnerability in Javascript escaping in smarty/smarty
High 7.1
In plain English
A high-severity cross-site scripting in smarty from smarty-php. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | smarty3 | 3.1.47-2+deb12u1 | DSA-5826-1 |
| Debian:12 | smarty3 | 3.1.47-2+deb12u1 | DEBIAN-CVE-2023-28447 |
| Debian:13 | smarty3 | 3.1.48-1 | DEBIAN-CVE-2023-28447 |
| Debian:14 | smarty3 | 3.1.48-1 | DEBIAN-CVE-2023-28447 |
| Debian:12 | smarty4 | 4.3.0-1+deb12u1 | DEBIAN-CVE-2023-28447 |
| Debian:13 | smarty4 | 4.3.1-1 | DEBIAN-CVE-2023-28447 |
| Debian:14 | smarty4 | 4.3.1-1 | DEBIAN-CVE-2023-28447 |
| Packagist | smarty/smarty | 3.1.48 | GHSA-7j98-h7fp-4vwj |
| Packagist | smarty/smarty | 4.3.1 | GHSA-7j98-h7fp-4vwj |
| Ubuntu:22.04:LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | USN-7158-1 |
| Ubuntu:22.04:LTS | smarty3 | 3.1.39-2ubuntu1.22.04.2 | UBUNTU-CVE-2023-28447 |
| Ubuntu:24.04:LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | UBUNTU-CVE-2023-28447 |
| Ubuntu:24.04:LTS | smarty3 | 3.1.48-1ubuntu0.24.04.1 | USN-7158-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| smarty-php | smarty | >= 4.0.0, < 4.3.1< 3.1.48 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
References
- https://github.com/smarty-php/smarty/security/advisories/GHSA-7j98-h7fp-4vwj x_refsource_CONFIRM
- https://github.com/smarty-php/smarty/commit/685662466f653597428966d75a661073104d713d x_refsource_MISC
- 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://lists.debian.org/debian-lts-announce/2024/11/msg00013.html