9.9
CRITICAL
CVE-2021-32829
ZStack REST API Groovy Shell Sandbox Bypass Remote Code Execution
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.

INFO

Published Date :

Aug. 17, 2021, 4:15 p.m.

Last Modified :

Nov. 21, 2024, 6:07 a.m.

Remotely Exploitable :

Yes !

Impact Score :

6.0

Exploitability Score :

3.1
Affected Products

The following products are affected by CVE-2021-32829 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Zstack zstack
2 Zstack rest_api
References to Advisories, Solutions, and Tools

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-32829 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-32829 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html
    Added Reference https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5
    Added Reference https://securitylab.github.com/advisories/GHSL-2021-065-zstack/
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Reanalysis by [email protected]

    Oct. 25, 2022

    Action Type Old Value New Value
    Added CWE NIST CWE-863
  • Initial Analysis by [email protected]

    Aug. 25, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:S/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
    Changed Reference Type https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html No Types Assigned https://blog.orange.tw/2019/02/abusing-meta-programming-for-unauthenticated-rce.html Not Applicable
    Changed Reference Type https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5 No Types Assigned https://github.com/zstackio/zstack/security/advisories/GHSA-6xgq-7rqg-x3q5 Third Party Advisory
    Changed Reference Type https://securitylab.github.com/advisories/GHSL-2021-065-zstack/ No Types Assigned https://securitylab.github.com/advisories/GHSL-2021-065-zstack/ Exploit, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:* versions from (including) 2.2.4 up to (excluding) 3.8.21 *cpe:2.3:a:zstack:rest_api:*:*:*:*:*:*:*:* versions from (including) 3.10.0 up to (excluding) 3.10.8
  • CVE Modified by [email protected]

    Aug. 17, 2021

    Action Type Old Value New Value
    Changed 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. 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.
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-32829 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-32829 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.39 }} -0.96%

score

0.78573

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability
© cvefeed.io
Latest DB Update: Jun. 09, 2025 1:44