CVE-2024-39864
RCE in Apache Cloudstack 4.0.0 – 4.18.2.1
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HSummary
CVE-2024-39864 is a critical-severity Code Injection (CWE-94) vulnerability in Apache Cloudstack. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked in the top 24% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2024-39864 affects the integration API service in Apache CloudStack. This service is intended to run unauthenticated on a configurable port for internal portal integrations or testing when the integration.api.port global setting is enabled. Due to improper initialization logic, setting the port value to its default of 0 causes the service to bind to a random port rather than remaining disabled, exposing an unintended listener on management hosts.
An attacker with network access to the CloudStack management segment can scan for the randomized port and reach the unauthenticated API. Successful exploitation permits unauthorized administrative operations that lead to remote code execution on CloudStack-managed hosts, resulting in complete compromise of confidentiality, integrity, and availability of the infrastructure. The vulnerability carries a CVSS 3.1 score of 9.8 and is associated with CWE-94 and CWE-665.
Public advisories from the Apache CloudStack project and downstream vendors recommend restricting network access to management server hosts to only essential ports and upgrading to version 4.18.2.1, 4.19.0.2, or later to correct the initialization flaw.
The EPSS score rose from a low baseline to a peak of 0.0537 on 2025-12-11 before receding to the current value of 0.0239.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-38269
Vulnerability Data
The CloudStack integration API service allows running its unauthenticated API server (usually on port 8096 when configured and enabled via integration.api.port global setting) for internal portal integrations and for testing purposes. By default, the integration API service port is disabled…
more
and is considered disabled when integration.api.port is set to 0 or negative. Due to an improper initialisation logic, the integration API service would listen on a random port when its port value is set to 0 (default value). An attacker that can access the CloudStack management network could scan and find the randomised integration API service port and exploit it to perform unauthorised administrative actions and perform remote code execution on CloudStack managed hosts and result in complete compromise of the confidentiality, integrity, and availability of CloudStack managed infrastructure. Users are recommended to restrict the network access on the CloudStack management server hosts to only essential ports. Users are recommended to upgrade to version 4.18.2.1, 4.19.0.2 or later, which addresses this issue.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V1.3.1
Mitigating Controls (NIST 800-53 r5) AI
Developer testing and evaluation finds code paths that accept and execute externally influenced strings.
Input validation directly stops untrusted data from being used to construct executable code without neutralization.
Least privilege limits the damage an injected code fragment can perform once executed.
Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.
Engineering principles applied during design and implementation can require explicit initialization to a known state.
Requiring the system to fail to a known state structurally reduces the chance that uninitialized resources remain reachable.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).
PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Security testing can detect uninitialized variables but does not itself enforce initialization practices.
Configuration management can enforce secure defaults and initialization settings but is not the primary control for code-level initialization.
Secure development life cycle mandates initialization checks and secure defaults that directly prevent improper resource initialization.
Secure system architecture and engineering principles require explicit initialization of resources and secure state management.
Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.
Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.