中危 Smarty 注入漏洞

CVE编号

CVE-2021-29454

利用情况

暂无

补丁情况

官方补丁

披露时间

2022-01-11
漏洞描述
Smarty是Smarty 是 PHP 的模板引擎,有助于将表示 (HTML/CSS) 与应用程序逻辑分离。

Smarty存在安全漏洞,该漏洞源于在版本3.1.42和4.0.2之前,模板作者可以通过构建一个恶意的数学字符串来运行任意PHP代码。如果一个数学字符串作为用户提供的数据传递给数学函数,外部用户可以通过制造一个恶意的数学字符串来运行任意PHP代码。用户应该升级到3.1.42或4.0.2版本来接收补丁。
解决建议
目前厂商已发布升级补丁以修复漏洞,补丁获取链接:

https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 smarty smarty * Up to
(excluding)
3.1.42
运行在以下环境
应用 smarty smarty * From
(including)
4.0.0
Up to
(excluding)
4.0.2
运行在以下环境
系统 debian_10 smarty3 * Up to
(excluding)
3.1.33+20180830.1.3a78a21f+selfpack1-1+deb10u1
运行在以下环境
系统 debian_11 smarty3 * Up to
(excluding)
3.1.39-2+deb11u1
运行在以下环境
系统 debian_12 smarty3 * Up to
(excluding)
3.1.45-1
运行在以下环境
系统 debian_9 smarty3 * Up to
(excluding)
3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u5
运行在以下环境
系统 fedora_36 php-Smarty * Up to
(excluding)
3.1.47-1.fc36
运行在以下环境
系统 fedora_37 php-Smarty * Up to
(excluding)
3.1.47-1.fc37
运行在以下环境
系统 fedora_EPEL_7 php-Smarty * Up to
(excluding)
3.1.47-1.el7
运行在以下环境
系统 ubuntu_18.04 smarty3 * Up to
(excluding)
3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
运行在以下环境
系统 ubuntu_21.10 smarty3 * Up to
(excluding)
3.1.39-2ubuntu0.21.10.1
运行在以下环境
系统 ubuntu_22.04 smarty3 * Up to
(excluding)
3.1.39-2ubuntu1
运行在以下环境
系统 ubuntu_22.10 smarty3 * Up to
(excluding)
3.1.39-2ubuntu1
阿里云评分
6.2
  • 攻击路径
    远程
  • 攻击复杂度
    复杂
  • 权限要求
    无需权限
  • 影响范围
    全局影响
  • EXP成熟度
    未验证
  • 补丁情况
    官方补丁
  • 数据保密性
    数据泄露
  • 数据完整性
    无影响
  • 服务器危害
    无影响
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-74 输出中的特殊元素转义处理不恰当(注入)
阿里云安全产品覆盖情况