Security Vulnerability Report
中文
CVE-2025-58724 CVSS 7.8 HIGH

CVE-2025-58724

Published: 2025-10-14 17:15:54
Last Modified: 2025-10-20 20:14:01

Description

Improper access control in Azure Connected Machine Agent allows an authorized attacker to elevate privileges locally.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:microsoft:azure_connected_machine_agent:*:*:*:*:*:*:*:* - VULNERABLE
Azure Connected Machine Agent 所有未安装2025年10月安全补丁的版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-58724 - Azure Connected Machine Agent Privilege Escalation PoC # Note: This is a conceptual PoC based on the vulnerability description. # The actual exploitation requires the Azure Connected Machine Agent to be installed. import subprocess import os import sys import time def check_agent_service(): """Check if Azure Connected Machine Agent (himds) service is running.""" print("[*] Checking Azure Connected Machine Agent service status...") try: result = subprocess.run( ['sc', 'query', 'himds'], capture_output=True, text=True, timeout=10 ) if 'RUNNING' in result.stdout: print("[+] Azure Connected Machine Agent (himds) is running") return True else: print("[-] Azure Connected Machine Agent service not found or not running") return False except Exception as e: print(f"[-] Error checking service: {e}") return False def find_agent_endpoints(): """Enumerate local IPC endpoints used by the agent.""" print("[*] Enumerating local agent communication endpoints...") endpoints = [] # Check for named pipes on Windows if sys.platform == 'win32': try: result = subprocess.run( ['powershell', '-Command', 'Get-ChildItem \\.\\pipe\\ | Where-Object {$_.Name -like "*himds*" -or $_.Name -like "*azcm*"}'], capture_output=True, text=True, timeout=15 ) for line in result.stdout.strip().split('\n'): if line.strip(): endpoints.append(line.strip()) print(f"[+] Found endpoint: {line.strip()}") except Exception as e: print(f"[-] Error enumerating pipes: {e}") # Check for Unix sockets on Linux elif sys.platform.startswith('linux'): socket_paths = [ '/var/opt/azcmagent/sockets/', '/run/azcmagent/', ] for path in socket_paths: if os.path.exists(path): for f in os.listdir(path): full_path = os.path.join(path, f) endpoints.append(full_path) print(f"[+] Found endpoint: {full_path}") return endpoints def exploit_privilege_escalation(endpoint): """Attempt privilege escalation via the agent's local interface.""" print(f"[*] Attempting privilege escalation via: {endpoint}") # The actual exploit would send crafted requests to the agent's local IPC # to trigger privileged operations without proper access control validation. # This is a placeholder demonstrating the attack concept. print("[!] Sending crafted request to elevate privileges...") print("[!] If successful, current process would gain SYSTEM/root privileges") # Conceptual: In a real exploit, this would interact with the himds service # to perform unauthorized privileged operations time.sleep(1) print("[*] PoC demonstration complete - actual exploitation requires specific agent version") def main(): print("=" * 60) print("CVE-2025-58724 PoC - Azure Connected Machine Agent LPE") print("Improper Access Control -> Local Privilege Escalation") print("=" * 60) if not check_agent_service(): print("[-] Target is not vulnerable: Agent service not detected") sys.exit(1) endpoints = find_agent_endpoints() if not endpoints: print("[-] No exploitable endpoints found") sys.exit(1) for endpoint in endpoints: exploit_privilege_escalation(endpoint) print("\n[*] Remediation: Update Azure Connected Machine Agent to the latest patched version") print("[*] Reference: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-58724") if __name__ == '__main__': main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-58724", "sourceIdentifier": "[email protected]", "published": "2025-10-14T17:15:53.823", "lastModified": "2025-10-20T20:14:00.857", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper access control in Azure Connected Machine Agent allows an authorized attacker to elevate privileges locally."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:azure_connected_machine_agent:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.57", "matchCriteriaId": "F305AB95-5543-4F2B-A76A-72A3C15C7C12"}]}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-58724", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}