smarty3 — security advisory
In Smarty before 3.1.47 and 4.x before 4.2.1, libs/plugins/function.mailto.php allows XSS. A web page that uses smarty_function_mailto, and that could be parameterized using GET or POST input parameters, could allow injection of JavaScript code by a user.
- Products
- smarty3
- Affected versions
- 3.1.21-1, 3.1.21-1ubuntu1, 3.1.21-1ubuntu1+esm1, 3.1.21-1ubuntu1+esm2, 3.1.31+20161214.1.c7d42e4+selfpack1-2, 3.1.31+20161214.1.c7d42e4+selfpack1-3, 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1, 3.1.33+20180830.1.3a78a21f+selfpack1-1, 3.1.34+20190228.1.c9f0de05+selfpack1-1, 3.1.39-2, 3.1.39-2ubuntu1, 3.1.39-2ubuntu1.22.04.1, 3.1.48-1, 3.1.48-2, 3.1.48-2build1
- Fixed versions
- 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1, 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1, 3.1.39-2ubuntu1.22.04.2, 3.1.48-1ubuntu0.24.04.1
- CVEs
- CVE-2018-25047
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 00:29 UTC · Revision 1
Source evidence
In Smarty before 3.1.47 and 4.x before 4.2.1, libs/plugins/function.mailto.php allows XSS. A web page that uses smarty_function_mailto, and that could be parameterized using GET or POST input parameters, could allow injection of JavaScript code by a user.
osv:UBUNTU-CVE-2018-25047
smarty3
Fixed versions: Not specified
smarty3
Fixed versions: 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1
smarty3
Fixed versions: 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1
smarty3
Fixed versions: 3.1.39-2ubuntu1.22.04.2
smarty3
Fixed versions: 3.1.48-1ubuntu0.24.04.1
smarty3
Fixed versions: Not specified
smarty3
Fixed versions: Not specified
smarty3
Fixed versions: Not specified
Complete source record
{
"id": "aae13b45691b62281df710933df2a9208f5857e6e06bd117cb27c054a37a2e35",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2018-25047",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2018-25047",
"summary": "In Smarty before 3.1.47 and 4.x before 4.2.1, libs/plugins/function.mailto.php allows XSS. A web page that uses smarty_function_mailto, and that could be parameterized using GET or POST input parameters, could allow injection of JavaScript code by a user.",
"evidence": "osv:UBUNTU-CVE-2018-25047",
"products": [
{
"name": {
"value": "smarty3",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.21-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.21-1ubuntu1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.21-1ubuntu1+esm1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.21-1ubuntu1+esm2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "3.1.31+20161214.1.c7d42e4+selfpack1-2",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.31+20161214.1.c7d42e4+selfpack1-3",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": [
{
"value": "3.1.33+20180830.1.3a78a21f+selfpack1-1",
"evidence": "/affected/2/versions"
},
{
"value": "3.1.34+20190228.1.c9f0de05+selfpack1-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.1.39-2ubuntu1.22.04.2",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": [
{
"value": "3.1.39-2",
"evidence": "/affected/3/versions"
},
{
"value": "3.1.39-2ubuntu1",
"evidence": "/affected/3/versions"
},
{
"value": "3.1.39-2ubuntu1.22.04.1",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.1.48-1ubuntu0.24.04.1",
"evidence": "/affected/4/ranges"
}
],
"affected_versions": [
{
"value": "3.1.48-1",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.48-2",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.48-2build1",
"evidence": "/affected/6/versions"
}
]
},
{
"name": {
"value": "smarty3",
"evidence": "/affected/7/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.48-2",
"evidence": "/affected/7/versions"
},
{
"value": "3.1.48-2build1",
"evidence": "/affected/7/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2018-25047",
"aliases": [
"UBUNTU-CVE-2018-25047"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=esm-apps%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"versions": [
"3.1.21-1",
"3.1.21-1ubuntu1",
"3.1.21-1ubuntu1+esm1",
"3.1.21-1ubuntu1+esm2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.21-1ubuntu1+esm2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=esm-apps%2Fbionic",
"ecosystem": "Ubuntu:Pro:18.04:LTS"
},
"versions": [
"3.1.31+20161214.1.c7d42e4+selfpack1-2",
"3.1.31+20161214.1.c7d42e4+selfpack1-3",
"3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1"
}
],
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"3.1.33+20180830.1.3a78a21f+selfpack1-1",
"3.1.34+20190228.1.c9f0de05+selfpack1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.39-2ubuntu1.22.04.2"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"3.1.39-2",
"3.1.39-2ubuntu1",
"3.1.39-2ubuntu1.22.04.1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.39-2ubuntu1.22.04.2"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.48-1ubuntu0.24.04.1"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"3.1.48-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.48-1ubuntu0.24.04.1"
}
],
"availability": "No subscription required"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"3.1.48-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.48-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"3.1.48-2build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.48-2build1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "smarty3",
"purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"3.1.48-2",
"3.1.48-2build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-25047.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "smarty3",
"binary_version": "3.1.48-2build1"
}
]
}
}
],
"modified": "2026-10-17T12:55:27.018254069Z",
"provider": "osv",
"upstream": [
"CVE-2018-25047"
],
"references": [
"https://ubuntu.com/security/CVE-2018-25047",
"https://github.com/smarty-php/smarty/issues/454",
"https://github.com/smarty-php/smarty/commit/f1f7ee6e34c14a8a9dfa5c6ef894d39277a93938",
"https://github.com/smarty-php/smarty/commit/55ea25d1f50f0406fb1ccedd212c527977793fc9",
"https://github.com/smarty-php/smarty/releases/tag/v4.2.1",
"https://github.com/smarty-php/smarty/releases/tag/v3.1.47",
"https://bugs.gentoo.org/870100",
"https://www.cve.org/CVERecord?id=CVE-2018-25047",
"https://ubuntu.com/security/notices/USN-7158-1"
]
},
"related_cves": [
{
"value": "CVE-2018-25047",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 353768,
"published_at": "2022-09-15T00:15:00+00:00"
}