Cross site scripting vulnerability in Javascript escaping in smarty/smarty
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-28447
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 12:13 UTC · Revision 1
Source evidence
Cross site scripting vulnerability in Javascript escaping in smarty/smarty
core-osv · Original sourcePublished 28 Mar 2023, 20:07 UTC
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.
osv:CVE-2023-28447
Complete source record
{
"id": "740b98615886dbea0d242ff7eab357b8e481733e839716f00e1a541e490c4b27",
"url": "https://osv.dev/vulnerability/CVE-2023-28447",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Cross site scripting vulnerability in Javascript escaping in smarty/smarty",
"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.",
"evidence": "osv:CVE-2023-28447",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2023-28447",
"aliases": [
"CVE-2023-28447",
"GHSA-7j98-h7fp-4vwj"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/smarty-php/smarty",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "2fc443806cdcaee4441be4d0bb09f8fa56a17f2c"
},
{
"introduced": "baebd59bb4da9fca89da382811b38c8313949c49"
},
{
"fixed": "e28cb0915b4e3749bf57d4ebae2984e25395cfe5"
},
{
"fixed": "685662466f653597428966d75a661073104d713d"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.1.48"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.3.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "685662466f653597428966d75a661073104d713d"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v4.3.0",
"v3.1.47",
"v4.2.1",
"v3.1.46",
"v4.2.0",
"v3.1.45",
"v4.1.1",
"v3.1.44",
"v4.1.0",
"v4.0.4",
"v3.1.43",
"v4.0.3",
"v3.1.42",
"v4.0.2",
"v3.1.41",
"v4.0.1",
"v4.0.0",
"v3.1.40",
"v3.1.39",
"v3.1.38",
"v3.1.37.1",
"v3.1.37",
"v3.1.36",
"v3.1.35",
"v3.1.34",
"v3.1.33",
"v3.1.32",
"v3.1.31",
"v3.1.30",
"v3.1.29",
"v3.1.28",
"v2.6.28",
"v3.1.27",
"v3.1.26",
"v3.1.25",
"v3.1.24",
"v3.1.23",
"v3.1.21",
"v3.1.20",
"v3.1.19",
"v3.1.18",
"v3.1.17",
"v3.1.16",
"v3.1.15",
"v3.1.14",
"v3.1.13",
"v3.1.12",
"v3.1.11",
"v2.6.27",
"v2.6.26",
"v2.6.25",
"v2.6.24"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-28447.json"
}
}
],
"modified": "2026-10-28T02:30:50.710485686Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2024/11/msg00013.html",
"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/CVEProject/cvelistV5/tree/main/cves/2023/28xxx/CVE-2023-28447.json",
"https://github.com/smarty-php/smarty/security/advisories/GHSA-7j98-h7fp-4vwj",
"https://nvd.nist.gov/vuln/detail/CVE-2023-28447",
"https://github.com/smarty-php/smarty/commit/685662466f653597428966d75a661073104d713d"
],
"provider_metadata": {
"cwe_ids": [
"CWE-79"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/28xxx/CVE-2023-28447.json"
}
},
"related_cves": [
{
"value": "CVE-2023-28447",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 519251,
"published_at": "2023-03-28T20:07:39.103+00:00"
}