Check provider logo

Compute instance metadata does not contain sensitive data

compute_instance_metadata_sensitive_data

Severitycritical
Servicecompute
by Prowler

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.

Run this check with Prowler CLI

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

CLI

openstack server unset --property <sensitive_key> <instance_id>

Terraform
Other
  1. Navigate to Compute > Instances
  2. Select instance with sensitive metadata
  3. Remove sensitive metadata keys using CLI command
  4. Rotate exposed credentials immediately
  5. Store secrets in Barbican or external secrets manager instead

Source Code

Resource Type

OS::Nova::Server

References