Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
An IMDS attack abuses the cloud instance metadata service at 169.254.169.254 to steal the credentials attached to a virtual machine, usually through a server-side request forgery flaw.

What Is an IMDS Attack?
Every cloud virtual machine can ask a local service for information about itself. That service, the instance metadata service, answers at the link-local address 169.254.169.254 and returns the instance identifier, its network configuration, any user data script it was launched with and—critically—temporary credentials for the role attached to the instance. An IMDS attack is any technique that gets an attacker’s request delivered to that endpoint so the response comes back to them.
The endpoint has no authentication. It cannot have any, because its whole purpose is to answer a workload that has not yet obtained a credential. Access control is therefore positional: anything that can make an HTTP request from the instance gets an answer. The credentials returned belong to the role the instance runs as, which in many estates is far broader than the application needs.
A successful request yields temporary access keys and a session token valid for hours. From there the attacker enumerates the account, reads storage, and looks for a route to a more privileged role—the sequence described in our entry on cloud credential leakage.
The clearest public example remains the Capital One breach. A misconfigured web application firewall allowed a server-side request forgery, which was used to query the metadata service and retrieve credentials for an over-permissioned role. Those credentials permitted listing and copying data from S3, and information relating to roughly 106 million people in the United States and Canada was taken. The attacker was convicted in June 2022, and the incident produced regulatory penalties running to many millions.
Three failures compounded: an exploitable application flaw, an instance role with far more access than the workload needed, and metadata access that required nothing but an outbound request. Fix any one and the chain breaks; fix all three and the path disappears.
Metadata: true header and Google requires Metadata-Flavor: Google, which blocks the most naive variants.Any application feature that accepts a URL is worth testing specifically, including the obscure ones—avatar import, callback registration, document conversion, and anything that renders HTML server-side. Check decimal and hexadecimal encodings of the address, alternative hostnames that resolve to it, and redirect chains, because naive blocklists catch the literal string and nothing else.
At Privia Security, we test these paths in client applications and cloud environments through our web application security services.
It is a link-local address used by all major cloud providers to expose the instance metadata service to the virtual machine running on that host. It is not routable on the internet and exists only from inside the instance. It returns configuration data, user data scripts, and temporary credentials for any role attached to the instance, which is what makes it valuable to an attacker.
A server-side request forgery flaw lets an attacker choose a URL that the server fetches on their behalf. Pointing it at the metadata endpoint makes the server request its own credentials and return them in the response. No authentication is involved, because the service answers anything originating from the instance. The attacker then uses the temporary keys against the cloud API from their own machine.
Usually not. A pod that can reach the node’s metadata endpoint inherits the node’s cloud identity, which is typically broader than any single workload needs. Block the link-local address with a network policy or the provider’s metadata concealment feature, and give each workload its own identity through IAM roles for service accounts, workload identity, or an equivalent mechanism.
Alert when credentials issued to an instance role are used from a source address outside your cloud provider’s published ranges. Legitimate use comes from the instance itself, so external use is a strong indicator of theft. AWS GuardDuty raises this as a specific finding type, and the equivalent detections exist in Microsoft Defender for Cloud and Google Security Command Centre.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.