HawkScan Test Info for Cloud Metadata Potentially Exposed

Cloud Metadata Potentially Exposed


Plugin Id: 90034


To mitigate the Cloud Metadata Attack, follow these steps:

  1. Secure NGINX server configuration: Ensure that your NGINX server is properly configured to prevent unauthorized access to the instance metadata. Specifically, make sure that the NGINX server does not allow requests to the internal IP address ‘’ used by cloud service providers to expose metadata.

    Example NGINX configuration to block requests to the internal IP address:

    server {
        listen 80;
        server_name example.com;
        location / {
            if ($http_host = "") {
                return 403;
            # Rest of the configuration...
  2. Implement network security measures: Utilize network security measures such as firewalls and access control lists (ACLs) to restrict access to the NGINX server and prevent unauthorized requests.

  3. Regularly update and patch NGINX: Keep your NGINX server up to date with the latest security patches and updates to ensure any known vulnerabilities are addressed.


The Cloud Metadata Attack targets misconfigured NGINX servers to exploit the instance metadata functionality provided by cloud service providers like AWS, GCP, and Azure. These providers expose metadata through an internal unroutable IP address ‘’. By misconfiguring NGINX, an attacker can access this metadata by sending requests with the ‘’ IP address in the Host header field.


If an attacker successfully exploits the Cloud Metadata Attack, they can gain unauthorized access to sensitive instance metadata. This metadata may include sensitive information such as access keys, tokens, and other credentials, which can be used to further compromise the cloud environment or launch additional attacks. Additionally, the exposure of instance metadata can lead to potential data breaches, unauthorized access to resources, and compromise of the entire cloud infrastructure. It is crucial to address this vulnerability to protect the confidentiality and integrity of the cloud environment.