Account users in Apache CloudStack by default are allowed to upload and register templates for…
CVE-2024-45219 is a high-severity improper input validation vulnerability in Apache CloudStack from Apache, with a CVSS 3.1 base score of 8.5 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected Apache CloudStack versions: 4.0.0 through 4.18.2.3; 4.19.0.0 through 4.19.1.1. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.22% chance of exploitation within 30 days, higher than 69% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Cloudstack to 4.18.2.4 or 4.19.1.2, whichever matches your release line, or a later version.
- Read the advisory on cloudstack.apache.org for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache CloudStack | 4.0.0 through 4.18.2.3; 4.19.0.0 through 4.19.1.1 | Not stated |
| Apache | Cloudstack | 4.0.0 up to, but not including, 4.18.2.4; 4.19.0.0 up to, but not including, 4.19.1.2 | 4.18.2.4, 4.19.1.2 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H. Scored by CNA (apache.org).
Official description
Account users in Apache CloudStack by default are allowed to upload and register templates for deploying instances and volumes for attaching them as data disks to their existing instances. Due to missing validation checks for KVM-compatible templates or volumes in CloudStack 4.0.0 through 4.18.2.3 and 4.19.0.0 through 4.19.1.1, an attacker that can upload or register templates and volumes, can use them to deploy malicious instances or attach uploaded volumes to their existing instances on KVM-based environments and exploit this to gain access to the host filesystems that could result in the compromise of resource integrity and confidentiality, data loss, denial of service, and availability of KVM-based infrastructure managed by CloudStack. Users are recommended to upgrade to Apache CloudStack 4.18.2.4 or 4.19.1.2, or later, which addresses this issue. Additionally, all user-uploaded or registered KVM-compatible templates and volumes can be scanned and checked that they are flat files that should not be using any additional or unnecessary features. For example, operators can run this on their secondary storage(s) and inspect output. An empty output for the disk being validated means it has no references to the host filesystems; on the other hand, if the output for the disk being validated is not empty, it might indicate a compromised disk. for file in $(find /path/to/storage/ -type f -regex [a-f0-9\-]*.*); do echo "Retrieving file [$file] info. If the output is not empty, that might indicate a compromised disk; check it carefully."; qemu-img info -U $file | grep file: ; printf "\n\n"; done The command can also be run for the file-based primary storages; however, bear in mind that (i) volumes created from templates will have references for the templates at first and (ii) volumes can be consolidated while migrating, losing their references to the templates. Therefore, the command execution for the primary storages can show both false positives and false negatives. For checking the whole template/volume features of each disk, operators can run the following command: for file in $(find /path/to/storage/ -type f -regex [a-f0-9\-]*.*); do echo "Retrieving file [$file] info."; qemu-img info -U $file; printf "\n\n"; done
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
How developers prevent this class of flaw
- Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build recognizers for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses.
- Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173).
- Understand all the potential areas where untrusted inputs can enter the product, including but not limited to: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Other references
- openwall.com/lists/oss-security/2024/10/15/2Mailing List
Other vulnerabilities in Apache CloudStack
- 7.5 High severity
- 8.1 High severity
- 7.2 High severity
- 9.1 Critical severity
- 8.8 High severity
- 9.1 Critical severity
Recent Improper Input Validation vulnerabilities
- 8.1 High severity
- 9.1 Critical severity
- 7.5 High severity
- 7.6 High severity
- 8.8 High severity
- 7.5 High severity
Spotted an error? Tell us.