CVE-2022-35741: Apache CloudStack SAML Single Sign-On XXE Vulnerability
Recently, A vulnerability that allows attackers to execute XML external entity (XXE) injection has been patched in Apache CloudStack.
Developed by The Apache Software Foundation, Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering, or as part of a hybrid cloud solution.
Apache CloudStack developers informed users on Monday that the product is affected by an XML external entity (XXE) injection vulnerability.
The flaw, tracked as CVE-2022-35741 has been addressed with the release of versions 4.16.1.1 or 4.17.0.1 or higher. The developers explained in a new advisory: “Apache CloudStack version 4.5.0 and later has a SAML 2.0 authentication Service Provider plugin which is found to be vulnerable to XML external entity (XXE) injection. This plugin is not enabled by default and the attacker would require that this plugin be enabled to exploit the vulnerability.”
“When the SAML 2.0 plugin is enabled in affected versions of Apache CloudStack could potentially allow the exploitation of XXE vulnerabilities. The SAML 2.0 messages constructed during the authentication flow in Apache CloudStack are XML-based and the XML data is parsed by various standard libraries that are now understood to be vulnerable to XXE injection attacks such as arbitrary file reading, possible denial of service, server-side request forgery (SSRF) on the CloudStack management server.”
According to CVE-2022-35741, Apache CloudStack versions 4.5.0 and later are vulnerable to this vulnerability. Users are urged to update their installations as soon as possible. To mitigate the risk, a CloudStack admin can do any of the following:
- Disable the SAML 2.0 plugin by setting `saml2.enabled` to false and restart the management servers.
- Upgrade to Apache CloudStack 4.16.1.1 or 4.17.0.1 or higher.