CVE-2025-59302 Apache CloudStack: Potential remote code execution on Javascript engine defined rules
Admins can execute arbitrary code via JavaScript injection in specific CloudStack APIs, requiring an upgrade to patched versions.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-59302?
CVE-2025-59302 is a medium-severity code injection vulnerability in Apache Cloudstack, published on 27 Nov 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Official description
In Apache CloudStack improper control of generation of code ('Code Injection') vulnerability is found in the following APIs which are accessible only to admins.
* quotaTariffCreate * quotaTariffUpdate * createSecondaryStorageSelector * updateSecondaryStorageSelector * updateHost * updateStorage
This issue affects Apache CloudStack: from 4.18.0 before 4.20.2, from 4.21.0 before 4.22.0. Users are recommended to upgrade to versions 4.20.2 or 4.22.0, which contain the fix.
The fix introduces a new global configuration flag, js.interpretation.enabled, allowing administrators to control the interpretation of JavaScript expressions in these APIs, thereby mitigating the code injection risk.
Weakness: CWE-94
Which versions are affected by CVE-2025-59302?
It affects 1 product.
Products include Apache Cloudstack.
How do I fix CVE-2025-59302?
No fix has been published for CVE-2025-59302 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-59302 being exploited?
There is no known exploitation of CVE-2025-59302 in the wild and no public exploit code.
Other vulnerabilities in Apache Cloudstack
- CVE-2012-4501 Missing authorization in n/a
- CVE-2024-38346 Apache CloudStack: Unauthenticated cluster service port leads to remote execution
- CVE-2024-39864 Apache CloudStack: Integration API service uses dynamic port when disabled
- CVE-2024-29006 Apache CloudStack: x-forwarded-for HTTP header parsed by default
- CVE-2022-35741 Apache CloudStack SAML Single Sign-On XXE
Sources
Also known as GHSA-hgmv-qpw9-xrfq.