CVE-2026-50112

Apache CloudStack: RCE and SSRF in direct download, metalink and NFS templates

Published Aug 21, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
SSRF via Metalink Mirror URL Resolution:

An authenticated tenant can register a template pointing to an attacker-controlled metalink file containing internal targets. The Secondary Storage VM will retrieve the data and persist it as a template file, which can later be downloaded through normal APIs.

RCE on KVM hypervisor via NFS, Metalink files with/without Direct Downloads:

An authenticated CloudStack tenant holding the default User role can execute arbitrary shell commands as root on the KVM hypervisor host that runs other tenants' VMs. This is cross-tenant root on the underlying compute, reachable via the public CloudStack API.


When a User registers a VM template with directDownload=true and a URL pointing to a .metalink file, the management server fetches the metalink XML and dispatches download to the KVM agent. Inner URLs inside the metalink XML are never re-validated against the scheme allowlist.


These issues affect Apache CloudStack: from 4.14.0.0 through 4.20.3.0 and from 4.21.0.0 through 4.22.1.0.

Users are recommended to upgrade to version 4.20.3.1 or 4.22.1.1 or later, which fixes the issue.

Analysis

AI-generated

Technical impact

The vulnerability allows an authenticated tenant to embed an attacker‑controlled metalink file or NFS reference that the CloudStack infrastructure will process without proper validation. Because the metalink XML can contain arbitrary URLs, the secondary storage VM retrieves the data, stores it as a template, and an API download of that template can be performed later. When a user registers a VM template with directDownload enabled and a URL pointing to a metalink file, the management server downloads the XML and then delegates the fetch to the KVM agent. The agent satisfies the inner URLs present in the metalink without applying the normal scheme allowlist, permitting connections to internal systems and leading to remote code execution on the KVM hypervisor host. This provides cross‑tenant root access to the compute node that hosts other tenants' virtual machines, effectively breaking tenant isolation. The weakness is characterized by two common weaknesses: operating system command injection (CWE-78) and server‑side request forgery (CWE-918), which together allow an authorized user with default privileges to execute commands on the hypervisor. Affected versions of Apache CloudStack range from 4.14.0.0 through 4.20.3.0 and from 4.21.0.0 through 4.22.1.0. The public CloudStack API is the likely attack vector because the vulnerability requires authenticated access but can be exercised through the normal management API.

Affected Systems

Apache Software Foundation’s Apache CloudStack product is impacted. All installations running any of the affected releases – from 4.14.0.0 to 4.20.3.0 inclusive, and from 4.21.0.0 to 4.22.1.0 inclusive – are vulnerable. The root-of-trust is the KVM hypervisor that hosts tenant VMs.

Risk and Exploitability

The vulnerability is graded as high severity (CVSS 8.8); exploitation yields root access on the host. The EPSS score is 0.00172, yet the nature of the flaw suggests a significant likelihood of exploitation in a cloud environment. The vulnerability is not currently listed in the CISA KEV catalog, but the nexus between client‑controlled metalink files and the server’s direct download path creates a straightforward exploitation scenario via the public CloudStack API. An attacker with valid API credentials and a default user role can craft a template that points to a malicious metalink or NFS source, causing the management server to relay the request to the hypervisor agent without validation, which then executes commands as root.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the vendor‑supplied patch by upgrading to at least CloudStack 4.20.3.1 or 4.22.1.1, versions which contain the fix.
  • Limit API privileges so that only trusted administrative accounts can register templates with directDownload enabled; remove or tightly constrain the default User role from performing such actions.
  • If a patch is not immediately available, block internal network traffic that the metalink URLs might target or enforce an explicit scheme allowlist for metalink files to prevent the hypervisor agent from reaching undisclosed targets.

Generated by OpenCVE AI on August 21, 2026 at 15:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:apache:cloudstack:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Apache
Apache cloudstack
Vendors & Products Apache
Apache cloudstack
Type Values Removed Values Added
Description SSRF via Metalink Mirror URL Resolution: An authenticated tenant can register a template pointing to an attacker-controlled metalink file containing internal targets. The Secondary Storage VM will retrieve the data and persist it as a template file, which can later be downloaded through normal APIs. RCE on KVM hypervisor via NFS, Metalink files with/without Direct Downloads: An authenticated CloudStack tenant holding the default User role can execute arbitrary shell commands as root on the KVM hypervisor host that runs other tenants' VMs. This is cross-tenant root on the underlying compute, reachable via the public CloudStack API. When a User registers a VM template with directDownload=true and a URL pointing to a .metalink file, the management server fetches the metalink XML and dispatches download to the KVM agent. Inner URLs inside the metalink XML are never re-validated against the scheme allowlist. These issues affect Apache CloudStack: from 4.14.0.0 through 4.20.3.0 and from 4.21.0.0 through 4.22.1.0. Users are recommended to upgrade to version 4.20.3.1 or 4.22.1.1 or later, which fixes the issue.
Title Apache CloudStack: RCE and SSRF in direct download, metalink and NFS templates
Weaknesses CWE-78
CWE-918
References
Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Aug 22, 2026, 3:56 AM
Reserved
Jun 3, 2026, 3:48 PM
Status
Analyzed
Published
Aug 21, 2026, 9:16 AM
Modified
Oct 16, 2026, 3:10 PM