zstack rest_api 对生成代码的控制不恰当(代码注入)

admin 2023-11-30 20:25:06 Ali_nvd 来源:ZONE.CI 全球网 0 阅读模式
zstack rest_api 对生成代码的控制不恰当(代码注入)

CVE编号

CVE-2021-32829

利用情况

暂无

补丁情况

N/A

披露时间

2021-08-18
漏洞描述
ZStack is open source IaaS(infrastructure as a service) software aiming to automate datacenters, managing resources of compute, storage, and networking all by APIs. Affected versions of ZStack REST API are vulnerable to post-authentication Remote Code Execution (RCE) via bypass of the Groovy shell sandbox. The REST API exposes the GET zstack/v1/batch-queries?script endpoint which is backed up by the BatchQueryAction class. Messages are represented by the APIBatchQueryMsg, dispatched to the QueryFacadeImpl facade and handled by the BatchQuery class. The HTTP request parameter script is mapped to the APIBatchQueryMsg.script property and evaluated as a Groovy script in BatchQuery.query the evaluation of the user-controlled Groovy script is sandboxed by SandboxTransformer which will apply the restrictions defined in the registered (sandbox.register()) GroovyInterceptor. Even though the sandbox heavily restricts the receiver types to a small set of allowed types, the sandbox is non effective at controlling any code placed in Java annotations and therefore vulnerable to meta-programming escapes. This issue leads to post-authenticated remote code execution. For more details see the referenced GHSL-2021-065. This issue is patched in versions 3.8.21, 3.10.8, and 4.1.0.
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
参考链接
https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 zstack rest_api * From (including) 2.2.4 Up to (excluding) 3.8.21
运行在以下环境
应用 zstack rest_api * From (including) 3.10.0 Up to (excluding) 3.10.8
CVSS3评分 9.9
  • 攻击路径 网络
  • 攻击复杂度 低
  • 权限要求 低
  • 影响范围 已更改
  • 用户交互 无
  • 可用性 高
  • 保密性 高
  • 完整性 高
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CWE-ID 漏洞类型
CWE-863 授权机制不正确
CWE-94 对生成代码的控制不恰当(代码注入)
- 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