In Apache CloudStack improper control of generation of code ('Code Injection') vulnerability is found in the following APIs which are accessible only to admins.
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.
{
"cwe_ids": [
"CWE-94"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59302.json",
"unresolved_ranges": [
{
"extracted_events": [
{
"introduced": "4.18.0"
},
{
"fixed": "4.20.2"
},
{
"introduced": "4.21.0"
},
{
"fixed": "4.22.0"
}
],
"source": "AFFECTED_FIELD"
},
{
"extracted_events": [
{
"introduced": "4.18.0"
},
{
"fixed": "4.20.2"
},
{
"introduced": "4.21.0"
},
{
"fixed": "4.22.0"
}
],
"source": "DESCRIPTION"
}
],
"cna_assigner": "apache"
}{
"cpe": [
"cpe:2.3:a:apache:cloudstack:*:*:*:*:*:*:*:*",
"cpe:2.3:a:apache:cloudstack:4.21.0.0:*:*:*:*:*:*:*"
],
"extracted_events": [
{
"introduced": "4.18.0.0"
},
{
"fixed": "4.20.2.0"
},
{
"introduced": "4.21.0.0"
},
{
"last_affected": "4.21.0.0"
}
],
"source": [
"CPE_RANGE",
"CPE_STRING"
]
}