[patched] — Webhook-url-http-3a-2f-2f169.254.169.254-2fmetadata-2fidentity-2foauth2-2ftoken
: This header is mandatory to prevent Server-Side Request Forgery (SSRF) attacks.
| Permission Level | Potential Actions | |-----------------|-------------------| | Reader on a single storage account | Read all blobs, files, tables – data exfiltration | | Contributor on a resource group | Deploy malicious VMs, modify configurations, delete resources | | Key Vault User | Read secrets, certificates, encryption keys | | Virtual Machine Contributor | Start/stop VMs, create snapshots, install extensions | | Global Administrator (rare, but possible if identity is assigned to privileged roles) | Full takeover of Azure AD tenant |
# Hostname must not be empty or local hostname = parsed.hostname if not hostname or hostname in ('localhost', 'metadata.google.internal', '169.254.169.254'): return False : This header is mandatory to prevent Server-Side
Create a dedicated HTTP client for webhook delivery with:
An attacker sends:
169.254.169.254 is a used by major cloud providers (AWS, Azure, GCP, etc.) to expose instance metadata. In Azure, the full endpoint for managed identity tokens is:
"access_token": "eyJ0eXAi...", "expires_in": "86399", "token_type": "Bearer" It allows virtual machines to get an OAuth2
You do not need to store credentials, service principal IDs, or passwords in your code.
It allows virtual machines to get an OAuth2 access token to authenticate to other Azure services (like Key Vault, Storage Accounts, or Azure SQL) without storing credentials (secrets/passwords) in code. service principal IDs