CVE-2024-28718
Executive Summary
CVE-2024-28718 is a critical security advisory affecting OpenStack Magnum, specifically the yoga-eom version. The vulnerability allows a remote attacker to execute arbitrary code via the cert_manager.py component. This flaw poses a severe risk to cloud infrastructure managed by OpenStack, potentially enabling full compromise of the Magnum service and its associated containers. The lack of a CVSS score and patch status indicates that this vulnerability may be newly discovered or under embargo, requiring immediate attention from security teams.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects OpenStack Magnum, a component of the OpenStack ecosystem. OpenStack is typically deployed via packages from distributions (e.g., Ubuntu, CentOS) or from the OpenStack project itself. The vulnerable component is cert_manager.py, which is part of the Magnum source code. Organizations should verify the integrity of their OpenStack packages and ensure they are sourced from trusted repositories.
CVSS Breakdown & Threat Level
The CVSS score is currently 0.0, which is unusual and may indicate that the vulnerability has not been fully analyzed or that the score is pending. Based on the description (remote code execution via a Python component), the likely CVSS vector would be:
- Attack Vector (AV): Network (N) – The attack can be launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – An attacker may need some level of access to the Magnum API.
- User Interaction (UI): None (N) – No user action is required.
- Scope (S): Unchanged (U) – The vulnerability affects only the Magnum component.
- Confidentiality (C): High (H) – Full system compromise possible.
- Integrity (I): High (H) – Full system compromise possible.
- Availability (A): High (H) – Full system compromise possible.
Estimated CVSS Score: 8.8 (High)
Threat Level: Critical – Remote code execution in a cloud orchestration service.
Deep Dive & Mechanics
The vulnerability resides in the cert_manager.py file of OpenStack Magnum. This component is responsible for managing TLS certificates for container clusters (e.g., Kubernetes). The flaw likely involves improper validation or sanitization of certificate-related data, allowing an attacker to inject arbitrary Python code or commands.
Attack Vector:
- An attacker with access to the Magnum API (e.g., via compromised credentials or network access) sends a crafted request to create or update a certificate.
- The
cert_manager.pycomponent processes the request without proper input validation. - The malicious payload is executed, leading to arbitrary code execution on the Magnum host.
Impact:
- Full compromise of the Magnum service.
- Potential lateral movement to managed container clusters (e.g., Kubernetes).
- Data exfiltration, service disruption, or further exploitation of the OpenStack environment.
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the vulnerable code pattern. The cert_manager.py likely contains a function that processes certificate data (e.g., PEM files) and passes it to a shell command or Python eval()/exec().
Vulnerable Code (Hypothetical):
def create_certificate(cert_data):
# Unsafe: directly using cert_data in a shell command
cmd = f"openssl x509 -in {cert_data} -text"
output = subprocess.check_output(cmd, shell=True)
return output
Patched Code (Hypothetical):
def create_certificate(cert_data):
# Safe: using subprocess with list arguments and input validation
import tempfile
with tempfile.NamedTemporaryFile(delete=False) as f:
f.write(cert_data.encode())
f.flush()
cmd = ["openssl", "x509", "-in", f.name, "-text"]
output = subprocess.check_output(cmd)
return output
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to the Magnum API (e.g., valid credentials or network access).
- Knowledge of the Magnum API endpoints (e.g.,
/v1/certificates).
Exploitation Steps:
- Identify the vulnerable endpoint (e.g., POST
/v1/certificates). - Craft a malicious payload that exploits the injection point in
cert_manager.py. - Send the request with the payload.
Example Payload (Hypothetical):
{
"cluster_uuid": "test-cluster",
"csr": "-----BEGIN CERTIFICATE REQUEST-----\n...\n-----END CERTIFICATE REQUEST-----",
"payload": "__import__('os').system('id')"
}
Note: No public exploit code is available. This is a hypothetical example.
Blue Team
Detection Steps:
- Monitor Magnum API logs for unusual requests to certificate endpoints.
- Look for patterns indicating code injection (e.g., special characters, shell commands).
- Implement network segmentation to limit access to the Magnum API.
Hunting Queries:
- Search for requests containing
__import__,os.system,subprocess, or similar Python keywords. - Monitor for unexpected child processes spawned by the Magnum service.
Indicators of Compromise (IOCs)
- Network IOCs:
- Unusual requests to
/v1/certificatesor similar endpoints. - Requests containing Python code or shell commands in JSON fields.
- Unusual requests to
- File IOCs:
- Modified
cert_manager.pyfile (if attacker patches it). - Unexpected files in
/tmp/or/var/lib/magnum/.
- Modified
- Process IOCs:
- Magnum processes spawning unexpected child processes (e.g.,
bash,python,nc).
- Magnum processes spawning unexpected child processes (e.g.,
- Log IOCs:
- Magnum logs showing errors or warnings related to certificate processing.
- Authentication logs showing repeated failed attempts to the Magnum API.
Detection Engineering
YARA Rule
rule CVE_2024_28718_Magnum_Cert_Manager {
meta:
description = "Detects exploitation attempts of CVE-2024-28718 in OpenStack Magnum cert_manager.py"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-28718"
strings:
$python_injection = /__import__\(|os\.system\(|subprocess\./ nocase
$shell_metachar = /[;&|`$]/ nocase
condition:
any of ($python_injection) or any of ($shell_metachar)
}
Sigma Rule
title: CVE-2024-28718 - OpenStack Magnum Certificate Manager Code Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2024-28718 via Magnum API logs
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: openstack
service: magnum
detection:
selection:
- event: "certificate.create"
- event: "certificate.update"
keywords:
- "__import__"
- "os.system"
- "subprocess"
- "eval("
- "exec("
condition: selection and keywords
falsepositives:
- Legitimate use of these strings in certificate data (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-28718 - OpenStack Magnum Certificate Manager Code Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/v1/certificates"; http_uri;
content:"__import__"; fast_pattern;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the Magnum service from untrusted networks.
- Restrict API access to trusted IPs and users.
- Monitor logs for exploitation attempts.
Long-term Fix:
- Apply patches from OpenStack when available.
- Upgrade to a non-vulnerable version of Magnum.
- Implement input validation and sanitization in
cert_manager.py.
Workarounds:
- Disable certificate management features if not required.
- Use a Web Application Firewall (WAF) to filter malicious requests.
Valters IT
DevSecOps & Cyber Threat Intelligence Expert