Skip to content
Heist/ feed
Back to feed
High

Apache CloudStack: Directly downloaded templates can be used to abuse KVM-based infrastructure

Type: advisorySources: OSV

Account users in Apache CloudStack by default are allowed to register templates to be downloaded directly to the primary storage for deploying instances. Due to missing validation checks for KVM-compatible templates in CloudStack 4.0.0 through 4.18.2.4 and 4.19.0.0 through 4.19.1.2, an attacker that can register templates, can use them to deploy malicious 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.5 or 4.19.1.3, or later, which addresses this issue. Additionally, all user-registered KVM-compatible templates 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 the following command on their file-based primary storage(s) and inspect the 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. 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 s

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-50386
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 17:33 UTC · Revision 1

Source evidence

Apache CloudStack: Directly downloaded templates can be used to abuse KVM-based infrastructure

core-osv · Original source

Published 12 Nov 2024, 14:34 UTC

Account users in Apache CloudStack by default are allowed to register templates to be downloaded directly to the primary storage for deploying instances. Due to missing validation checks for KVM-compatible templates in CloudStack 4.0.0 through 4.18.2.4 and 4.19.0.0 through 4.19.1.2, an attacker that can register templates, can use them to deploy malicious 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.5 or 4.19.1.3, or later, which addresses this issue. Additionally, all user-registered KVM-compatible templates 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 the following command on their file-based primary storage(s) and inspect the 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. 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 s

osv:CVE-2024-50386
Complete source record
{
  "id": "e55e2dab42a792393341c401055abb77a9c212566f4db8208db2b52b8f6c8733",
  "url": "https://osv.dev/vulnerability/CVE-2024-50386",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Apache CloudStack: Directly downloaded templates can be used to abuse KVM-based infrastructure",
    "summary": "Account users in Apache CloudStack by default are allowed to register templates to be downloaded directly to the primary storage for deploying instances. Due to missing validation checks for KVM-compatible templates in CloudStack 4.0.0 through 4.18.2.4 and 4.19.0.0 through 4.19.1.2, an attacker that can register templates, can use them to deploy malicious 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.5 or 4.19.1.3, or later, which addresses this issue. Additionally, all user-registered KVM-compatible templates 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 the following command on their file-based primary storage(s) and inspect the 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. 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 s",
    "evidence": "osv:CVE-2024-50386",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-50386",
      "aliases": [
        "CVE-2024-50386"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apache/cloudstack",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6355965dcd956811dd471a9d03c73dadcf68f480"
                },
                {
                  "fixed": "84538da27c0173a8daa9cad93643802dfcf271d8"
                },
                {
                  "introduced": "2746225b999612f156e421199e34ef8de98a3664"
                },
                {
                  "fixed": "07468f55a28af0d98b6fdb3d726762e8b5d1377f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apache:cloudstack:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.18.2.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:apache:cloudstack:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.19.0.0"
                      },
                      {
                        "fixed": "4.19.1.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "4.19.1.2",
            "4.19.1.1",
            "4.19.1.0",
            "4.19.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-50386.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:44.561545897Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50386.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-50386",
        "https://www.shapeblue.com/shapeblue-security-advisory-apache-cloudstack-security-releases-4-18-2-5-and-4-19-1-3/",
        "https://cloudstack.apache.org/blog/security-release-advisory-4.18.2.5-4.19.1.3",
        "https://lists.apache.org/thread/d0x83c2cyglzzdw8csbop7mj7h83z95y"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-20"
        ],
        "cna_assigner": "apache",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.0.0"
                  },
                  {
                    "last_affected": "4.18.2.4"
                  },
                  {
                    "introduced": "4.19.0.0"
                  },
                  {
                    "last_affected": "4.19.1.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/50xxx/CVE-2024-50386.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-50386",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 512541,
  "published_at": "2024-11-12T14:34:08.537+00:00"
}