CVE-2021-32829
CVSS V2 Medium 6.5
CVSS V3 Critical 9.9
Description
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.
Overview
- CVE ID
- CVE-2021-32829
- Assigner
- security-advisories@github.com
- Vulnerability Status
- Analyzed
- Published Version
- 2021-08-17T16:15:07
- Last Modified Date
- 2022-10-25T15:55:57
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:* | 1 | OR | 2.2.4 | 3.8.21 |
cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:* | 1 | OR | 3.10.0 | 3.10.8 |
CVSS Version 2
- Version
- 2.0
- Vector String
- AV:N/AC:L/Au:S/C:P/I:P/A:P
- Access Vector
- NETWORK
- Access Compatibility
- LOW
- Authentication
- SINGLE
- Confidentiality Impact
- PARTIAL
- Integrity Impact
- PARTIAL
- Availability Impact
- PARTIAL
- Base Score
- 6.5
- Severity
- MEDIUM
- Exploitability Score
- 8
- Impact Score
- 6.4
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- Attack Vector
- NETWORK
- Attack Compatibility
- LOW
- Privileges Required
- LOW
- User Interaction
- NONE
- Scope
- CHANGED
- Confidentiality Impact
- HIGH
- Availability Impact
- HIGH
- Base Score
- 9.9
- Base Severity
- CRITICAL
- Exploitability Score
- 3.1
- Impact Score
- 6
References
Reference URL | Reference Tags |
---|---|
https://securitylab.github.com/advisories/GHSL-2021-065-zstack/ | Exploit Third Party Advisory |
https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5 | Third Party Advisory |
https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html | Not Applicable |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2021-32829 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32829 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-05-10 06:56:03 | Added to TrackCVE | |||
2022-12-05 08:23:00 | 2021-08-17T16:15Z | 2021-08-17T16:15:07 | CVE Published Date | updated |
2022-12-05 08:23:00 | 2022-10-25T15:55:57 | CVE Modified Date | updated | |
2022-12-05 08:23:00 | Analyzed | Vulnerability Status | updated |