GLSA-202209-09 : Smarty: Multiple vulnerabilities

high Nessus Plugin ID 165442

Description

The remote host is affected by the vulnerability described in GLSA-202209-09 (Smarty: Multiple vulnerabilities)

- 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. (CVE-2018-25047)

- Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch. (CVE-2021-21408)

- Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch. (CVE-2021-29454)

- Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.45 and 4.1.1, template authors could inject php code by choosing a malicious {block} name or {include} file name. Sites that cannot fully trust template authors should upgrade to versions 3.1.45 or 4.1.1 to receive a patch for this issue. There are currently no known workarounds. (CVE-2022-29221)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

All Smarty users should upgrade to the latest version:

# emerge --sync # emerge --ask --oneshot --verbose >=dev-php/smarty-4.2.1

See Also

https://security.gentoo.org/glsa/202209-09

https://bugs.gentoo.org/show_bug.cgi?id=830980

https://bugs.gentoo.org/show_bug.cgi?id=845180

https://bugs.gentoo.org/show_bug.cgi?id=870100

Plugin Details

Severity: High

ID: 165442

File Name: gentoo_GLSA-202209-09.nasl

Version: 1.3

Type: local

Published: 9/25/2022

Updated: 10/10/2023

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.5

Temporal Score: 5.1

Vector: CVSS2#AV:N/AC:L/Au:S/C:P/I:P/A:P

CVSS Score Source: CVE-2022-29221

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.9

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:smarty, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 9/25/2022

Vulnerability Publication Date: 1/10/2022

Reference Information

CVE: CVE-2018-25047, CVE-2021-21408, CVE-2021-29454, CVE-2022-29221