PHp code Injection in Smarty



Published: 2022-03-28
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2021-21408
CWE-ID CWE-94
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
Smarty
Web applications / CMS

Vendor smarty.php.net

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Code Injection

EUVDB-ID: #VU61665

Risk: Medium

CVSSv3.1: 6.3 [CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2021-21408

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: No

Description

The vulnerability allows a remote user to execute arbitrary code on the target system.

The vulnerability exists due to improper input validation. A remote user with access to template can run restricted static PHP methods.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

Smarty: 3.1 - 4.0.2

External links

http://github.com/smarty-php/smarty/commit/19ae410bf56007a5ef24441cdc6414619cfaf664
http://github.com/smarty-php/smarty/releases/tag/v3.1.43
http://github.com/smarty-php/smarty/security/advisories/GHSA-4h9c-v5vg-5m6m
http://github.com/smarty-php/smarty/releases/tag/v4.0.3


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote authenticated privileged user via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###