OpenStack compute instance metadata is evaluated to detect sensitive data such as passwords, API keys, secrets, and private keys. Instance metadata is accessible via the metadata service (169.254.169.254) to any process inside the instance. Storing secrets in metadata exposes them to SSRF attacks, compromised applications, and unauthorized access.
Risk
Instance metadata containing sensitive data exposes credentials through the metadata service (169.254.169.254), accessible to any process inside the instance. Attackers exploiting SSRF, compromised applications, or insider threats can extract passwords, API keys, and private keys. Stolen credentials enable unauthorized modifications, privilege escalation, resource deletion, and cryptomining.
prowler openstack --checks compute_instance_metadata_sensitive_data
Recommendation
Never store secrets in metadata; use Barbican (OpenStack Key Manager), Vault, or external secrets management instead. Retrieve secrets at runtime via APIs. Implement least privilege access to secrets with RBAC. Enable secrets audit logging. Use envelope encryption for secrets at rest. Implement automatic rotation every 90 days. Scan metadata for hardcoded secrets using tools like TruffleHog.
Remediation
openstack server unset --property <sensitive_key> <instance_id>
- Navigate to Compute > Instances
- Select instance with sensitive metadata
- Remove sensitive metadata keys using CLI command
- Rotate exposed credentials immediately
- Store secrets in Barbican or external secrets manager instead
Source Code
Resource Type
OS::Nova::Server