低危 mechanize_project mechanize os命令中使用的特殊元素转义处理不恰当(os命令注入)
CVE编号
CVE-2021-21289利用情况
暂无补丁情况
官方补丁披露时间
2021-02-03漏洞描述
Mechanize is an open-source ruby library that makes automated web interaction easy. In Mechanize from version 2.0.0 and before version 2.7.7 there is a command injection vulnerability. Affected versions of mechanize allow for OS commands to be injected using several classes' methods which implicitly use Ruby's Kernel.open method. Exploitation is possible only if untrusted input is used as a local filename and passed to any of these calls: Mechanize::CookieJar#load, Mechanize::CookieJar#save_as, Mechanize#download, Mechanize::Download#save, Mechanize::File#save, and Mechanize::FileResponse#read_body. This is fixed in version 2.7.7.解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。受影响软件情况
# | 类型 | 厂商 | 产品 | 版本 | 影响面 | ||||
1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
运行在以下环境 | |||||||||
应用 | mechanize_project | mechanize | * | From (including) 2.0 | Up to (excluding) 2.7.7 | ||||
运行在以下环境 | |||||||||
系统 | debian_10 | ruby-mechanize | * | Up to (excluding) 2.7.6-1+deb10u1 | |||||
运行在以下环境 | |||||||||
系统 | debian_11 | ruby-mechanize | * | Up to (excluding) 2.7.7-1 | |||||
运行在以下环境 | |||||||||
系统 | debian_12 | ruby-mechanize | * | Up to (excluding) 2.7.7-1 | |||||
运行在以下环境 | |||||||||
系统 | debian_9 | ruby-mechanize | * | Up to (excluding) 2.7.5-1+deb9u1 | |||||
运行在以下环境 | |||||||||
系统 | debian_sid | ruby-mechanize | * | Up to (excluding) 2.7.7-1 | |||||
运行在以下环境 | |||||||||
系统 | fedora_32 | rubygem-mechanize | * | Up to (excluding) 2.7.7-1.fc32 | |||||
运行在以下环境 | |||||||||
系统 | fedora_33 | rubygem-mechanize | * | Up to (excluding) 2.7.7-1.fc33 | |||||
- 攻击路径 远程
- 攻击复杂度 困难
- 权限要求 无需权限
- 影响范围 有限影响
- EXP成熟度 N/A
- 补丁情况 官方补丁
- 数据保密性 数据泄露
- 数据完整性 无影响
- 服务器危害 无影响
- 全网数量 N/A
CWE-ID | 漏洞类型 |
CWE-78 | OS命令中使用的特殊元素转义处理不恰当(OS命令注入) |
Exp相关链接

版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
评论