neoan neoan3-template 不安全的继承权限

admin 2023-11-30 18:53:27 Ali_nvd 来源:ZONE.CI 全球网 0 阅读模式
中危 neoan neoan3-template 不安全的继承权限

CVE编号

CVE-2021-41170

利用情况

暂无

补丁情况

官方补丁

披露时间

2021-11-09
漏洞描述
### Impact Versions prior 1.1.1 have allowed for passing in closures directly into the template engine. As a result values that are callable are executed by the template engine. The issue arises if a value has the same name as a method or function in scope and can therefore be executed either by mistake or maliciously. In theory all users of the package are affected as long as they either deal with direct user input or database values. A multi-step attack on is therefore plausible. ### Patches Version 1.1.1 has addressed this vulnerability. ```php $params = [ 'reverse' => fn($input) => strrev($input), // <-- no longer possible with version ~1.1.1 'value' => 'My website' ] TemplateFunctions::registerClosure('reverse', fn($input) => strrev($input)); // <-- still possible (and nicely isolated) Template::embrace('<h1>{{reverse(value)}}</h1>', $params); ``` ### Workarounds Unfortunately only working with hardcoded values is safe in prior versions. As this likely defeats the purpose of a template engine, please upgrade. ### References As a possible exploit is relatively easy to achieve, I will not share steps to reproduce the issue for now. ### For more information If you have any questions or comments about this advisory: * Open an issue in [our repo](https://github.com/sroehrl/neoan3-template)
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
参考链接
https://github.com/sroehrl/neoan3-template/commit/4a2c9570f071d3c8f4ac7900075...
https://github.com/sroehrl/neoan3-template/issues/8
https://github.com/sroehrl/neoan3-template/security/advisories/GHSA-3v56-q6r6-4gcw
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 neoan neoan3-template * Up to (excluding) 1.1.1
阿里云评分 6.2
  • 攻击路径 本地
  • 攻击复杂度 复杂
  • 权限要求 普通权限
  • 影响范围 越权影响
  • EXP成熟度 未验证
  • 补丁情况 官方补丁
  • 数据保密性 无影响
  • 数据完整性 无影响
  • 服务器危害 无影响
  • 全网数量 N/A
CWE-ID 漏洞类型
CWE-277 不安全的继承权限
CWE-732 关键资源的不正确权限授予
CWE-74 输出中的特殊元素转义处理不恰当(注入)
- avd.aliyun.com
weinxin
版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
N/A Ali_nvd

N/A

N/ACVE编号 CVE-2024-9120利用情况 暂无补丁情况 N/A披露时间 2024-09-23漏洞描述Use after free in Dawn
评论:0   参与:  0