{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32829 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2021-32829 yet. Limit exposure of the affected software until one is available.","what":"CVE-2021-32829 is a critical code injection vulnerability in zstackio zstack, published on 17 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32829 and fix it if it is affected.\n\nWhat it is: CVE-2021-32829 is a critical code injection vulnerability in zstackio zstack, published on 17 Aug 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32829 in the wild and no public exploit code.\n\nAffected product: zstackio zstack. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-32829/ (Markdown: https://insights.sbomify.com/CVE-2021-32829/index.md)","id":"CVE-2021-32829","markdown":"https://insights.sbomify.com/CVE-2021-32829/index.md","name":"CVE-2021-32829","record":{"aliases":["GHSA-3q79-gjf7-rwwf"],"analysis":{"component_type":"cloud_service","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"ZStack IaaS software","requires_auth":"low_privilege","summary":"Authenticated attackers can execute arbitrary code by bypassing the Groovy sandbox in the ZStack REST API batch-query endpoint.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"rest_api","vendor":"zstack"}],"cvss":{"score":9.6,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":null,"headline":"Post-authentication Remote Code Execution (RCE) in ZStack REST API","id":"CVE-2021-32829","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"code_injection","year":"2021"},"n_packages":0,"n_references":3,"next":{"headline":"Command injection in @diez/generation","id":"CVE-2021-32830"},"packages":[],"prev":{"headline":"Regular expression Denial of Service in MooTools","id":"CVE-2021-32828"},"products":["zstack"],"published":"2021-08-17","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["zstackio"]},"summary":"Authenticated attackers can execute arbitrary code by bypassing the Groovy sandbox in the ZStack REST API batch-query endpoint.","url":"https://insights.sbomify.com/CVE-2021-32829/"}