Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2021-32829

Summary
Assigner-GitHub_M
Assigner Org ID-a0819718-46f1-4df5-94e2-005712e83aaa
Published At-17 Aug, 2021 | 16:00
Updated At-03 Aug, 2024 | 23:33
Rejected At-
Credits

Post-authentication Remote Code Execution (RCE) in ZStack REST API

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.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:GitHub_M
Assigner Org ID:a0819718-46f1-4df5-94e2-005712e83aaa
Published At:17 Aug, 2021 | 16:00
Updated At:03 Aug, 2024 | 23:33
Rejected At:
▼CVE Numbering Authority (CNA)
Post-authentication Remote Code Execution (RCE) in ZStack REST API

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.

Affected Products
Vendor
zstackio
Product
zstack
Versions
Affected
  • < 3.8.21
  • >=3.10.0, < 3.10.8
  • >=4.0.0, < 4.1.0
Problem Types
TypeCWE IDDescription
CWECWE-94CWE-94 Improper Control of Generation of Code ('Code Injection')
Type: CWE
CWE ID: CWE-94
Description: CWE-94 Improper Control of Generation of Code ('Code Injection')
Metrics
VersionBase scoreBase severityVector
3.19.6CRITICAL
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Version: 3.1
Base score: 9.6
Base severity: CRITICAL
Vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
x_refsource_CONFIRM
https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
x_refsource_MISC
https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
x_refsource_MISC
Hyperlink: https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
Resource:
x_refsource_CONFIRM
Hyperlink: https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
Resource:
x_refsource_MISC
Hyperlink: https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
Resource:
x_refsource_MISC
▼Authorized Data Publishers (ADP)
CVE Program Container
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
x_refsource_CONFIRM
x_transferred
https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
x_refsource_MISC
x_transferred
https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
x_refsource_MISC
x_transferred
Hyperlink: https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
Resource:
x_refsource_CONFIRM
x_transferred
Hyperlink: https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
Resource:
x_refsource_MISC
x_transferred
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:security-advisories@github.com
Published At:17 Aug, 2021 | 16:15
Updated At:25 Oct, 2022 | 15:55

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.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Primary3.19.9CRITICAL
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Secondary3.19.6CRITICAL
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Primary2.06.5MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P
Type: Primary
Version: 3.1
Base score: 9.9
Base severity: CRITICAL
Vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Type: Secondary
Version: 3.1
Base score: 9.6
Base severity: CRITICAL
Vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
Type: Primary
Version: 2.0
Base score: 6.5
Base severity: MEDIUM
Vector:
AV:N/AC:L/Au:S/C:P/I:P/A:P
CPE Matches

zstack
zstack
>>rest_api>>Versions from 2.2.4(inclusive) to 3.8.21(exclusive)
cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:*
zstack
zstack
>>rest_api>>Versions from 3.10.0(inclusive) to 3.10.8(exclusive)
cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:*
Weaknesses
CWE IDTypeSource
CWE-863Primarynvd@nist.gov
CWE-94Secondarysecurity-advisories@github.com
CWE ID: CWE-863
Type: Primary
Source: nvd@nist.gov
CWE ID: CWE-94
Type: Secondary
Source: security-advisories@github.com
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.htmlsecurity-advisories@github.com
Not Applicable
https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5security-advisories@github.com
Third Party Advisory
https://securitylab.github.com/advisories/GHSL-2021-065-zstack/security-advisories@github.com
Exploit
Third Party Advisory
Hyperlink: https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
Source: security-advisories@github.com
Resource:
Not Applicable
Hyperlink: https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
Source: security-advisories@github.com
Resource:
Third Party Advisory
Hyperlink: https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
Source: security-advisories@github.com
Resource:
Exploit
Third Party Advisory

Change History

0
Information is not available yet

Similar CVEs

0Records found

Details not found