CVE-2025-59302 Apache CloudStack: Potential remote code execution on Javascript engine defined rules

Medium 4.7 Published Updated

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.

All Apache Cloudstack vulnerabilities

Sources

Also known as GHSA-hgmv-qpw9-xrfq.

Is CVE-2025-59302 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free