CVE-2026-50112 in CloudStack
Summary
by MITRE • 08/21/2026
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.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 08/22/2026
The vulnerability described involves a critical server-side request forgery and remote code execution flaw within Apache CloudStack versions ranging from 4.14.0.0 to 4.20.3.0 and from 4.21.0.0 through 4.22.1.0. This issue stems from the improper validation of URLs contained within Metalink files when a tenant registers a VM template with direct download enabled. The core technical flaw lies in the management server's handling of these XML-based metadata files. When an authenticated user provides a URL pointing to a .metalink file, the system fetches and parses this document without re-validating the inner URLs against the configured scheme allowlist. This lack of recursive validation allows attackers to embed references to internal network resources or malicious payloads that bypass standard security controls designed to restrict external access patterns.
The operational impact begins with Server-Side Request Forgery via Metalink Mirror URL Resolution. An authenticated tenant can register a template pointing to an attacker-controlled metalink file containing links to internal targets. The Secondary Storage VM retrieves this data and persists it as a template file, which can subsequently be downloaded through normal APIs. This mechanism effectively allows the cloud infrastructure to act as a proxy for accessing internal network resources that should otherwise remain isolated from tenant-level operations. By leveraging this SSRF capability, an attacker can probe internal services, exfiltrate sensitive data from restricted networks, or map out the internal topology of the cloud environment, significantly expanding the attack surface beyond what is typically available to standard users.
The severity escalates dramatically when considering Remote Code Execution on KVM hypervisors via NFS and Metalink files with or 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 represents a cross-tenant privilege escalation, granting an attacker full control over the underlying compute infrastructure. Because this vector is reachable via the public CloudStack API, it poses a severe risk to multi-tenant environments where isolation between customers is paramount. The ability to execute commands as root on the hypervisor allows for complete compromise of all virtual machines hosted on that host, leading to data breaches, service disruption, and potential lateral movement across the broader network infrastructure.
From a classification perspective, this vulnerability aligns with CWE-918 Server-Side Request Forgery due to the improper validation of user-supplied URLs leading to unauthorized internal requests. The remote code execution aspect corresponds to CWE-78 Improper Neutralization of Special Elements used in an OS Command and CWE-269 Improvement of Privileges, as it allows a lower-privileged user to gain root access on critical infrastructure components. In terms of the MITRE ATT&CK framework, this exploit maps to T1059 Command and Scripting Interpreter for executing arbitrary code and potentially T1486 Data Encrypted for Impact if used in conjunction with ransomware or data destruction tactics following initial compromise. The cross-tenant nature also highlights failures in logical isolation controls often associated with cloud architecture vulnerabilities.
To mitigate these risks, users are strongly recommended to upgrade Apache CloudStack immediately to version 4.20.3.1 or 4.22.1.1 or later, where the validation logic for inner URLs within Metalink files has been corrected. Until an upgrade is feasible, administrators should enforce strict network segmentation and firewall rules that prevent Secondary Storage VMs from initiating outbound connections to untrusted external sources unless explicitly whitelisted. Additionally, implementing web application firewalls with deep inspection capabilities can help detect malformed or suspicious XML structures in template registration requests. Regular auditing of tenant activities and restricting the ability to register templates via direct download URLs for non-administrative users further reduces the attack surface available to potential adversaries seeking to exploit this flaw.