CVE-2025-47988 Overview
CVE-2025-47988 is a code injection vulnerability in Microsoft Azure Monitor Agent. The flaw allows an unauthenticated attacker on an adjacent network to execute arbitrary code on systems running the agent. Microsoft tracks the weakness under CWE-94, improper control of generation of code.
The vulnerability impacts confidentiality, integrity, and availability of affected hosts. Azure Monitor Agent runs with elevated privileges to collect telemetry from virtual machines and on-premises servers. Successful exploitation grants the attacker code execution within the agent process context.
Critical Impact
Adjacent-network attackers can inject and execute code through Azure Monitor Agent without authentication or user interaction, compromising telemetry pipelines and host systems.
Affected Products
- Microsoft Azure Monitor Agent (all versions prior to the July 2025 security update)
- Windows hosts running Azure Monitor Agent for VM Insights and Log Analytics
- Linux hosts running Azure Monitor Agent for data collection rules
Discovery Timeline
- 2025-07-08 - CVE-2025-47988 published to NVD
- 2025-07-08 - Microsoft releases security update for Azure Monitor Agent
- 2025-07-23 - Last updated in NVD database
Technical Details for CVE-2025-47988
Vulnerability Analysis
The vulnerability stems from improper neutralization of input used in code generation within Azure Monitor Agent. The agent processes telemetry directives, configuration payloads, and data collection rules from adjacent network sources. Insufficient validation of these inputs permits an attacker to inject executable code that the agent subsequently runs.
The attack vector is restricted to adjacent networks, meaning the attacker must reach the agent through the same broadcast domain, VPN segment, or logically adjacent network path. No authentication is required, and no user interaction is needed. Attack complexity is high because the attacker must control or position themselves on a network adjacent to the target.
Exploitation yields code execution within the privileged agent process. Because Azure Monitor Agent collects logs, performance counters, and security events, compromise can also taint downstream telemetry consumed by Microsoft Sentinel and Log Analytics workspaces.
Root Cause
The root cause is improper control of code generation [CWE-94]. The agent constructs and executes code paths from data received over the network without enforcing strict input validation, allow-list parsing, or sandboxing. Attacker-controlled fields are interpreted as code rather than treated as inert data.
Attack Vector
An attacker on an adjacent network sends a crafted payload to a listening Azure Monitor Agent endpoint or to a service the agent communicates with. The payload is parsed in a context where it influences code generation. The agent then executes the injected code with its own privileges. See the Microsoft Security Update for CVE-2025-47988 for vendor-specific guidance.
No public proof-of-concept exploit has been published, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog at the time of writing.
Detection Methods for CVE-2025-47988
Indicators of Compromise
- Unexpected child processes spawned by AzureMonitorAgent.exe or mdsd on Linux hosts
- Anomalous outbound connections from the Azure Monitor Agent process to non-Microsoft endpoints
- Modified or unsigned binaries within the Azure Monitor Agent installation directory
- Unusual data collection rule changes or configuration writes not initiated by an administrator
Detection Strategies
- Monitor process lineage for Azure Monitor Agent and alert on shell or scripting interpreters launched as children
- Inspect network traffic on agent ports for malformed payloads originating from adjacent subnets
- Correlate agent version inventory with the Microsoft Security Response Center advisory to identify unpatched hosts
Monitoring Recommendations
- Enable Microsoft Defender for Cloud agent health and integrity monitoring across all VMs
- Forward Azure Monitor Agent audit logs to a SIEM and build detections for configuration drift
- Establish a baseline of normal agent network behavior and alert on deviations
How to Mitigate CVE-2025-47988
Immediate Actions Required
- Apply the Azure Monitor Agent security update referenced in the Microsoft advisory to all Windows and Linux hosts
- Inventory agent versions across the estate using Azure Resource Graph or Update Management
- Restrict adjacent network access to agent hosts through network security groups and host firewalls
Patch Information
Microsoft published the fix on 2025-07-08. Apply the updated Azure Monitor Agent extension on Azure VMs and the standalone installer on Arc-enabled and on-premises systems. Verify the agent version after deployment to confirm remediation. Refer to the Microsoft Security Update CVE-2025-47988 for build numbers.
Workarounds
- Segment management networks to prevent untrusted devices from reaching agent hosts on adjacent subnets
- Restrict inbound traffic to the agent using host-based firewall rules until the patch is deployed
- Disable unused data collection rules to reduce the parsing surface exposed by the agent
# Verify Azure Monitor Agent version on Azure VMs
az vm extension list \
--resource-group <rg-name> \
--vm-name <vm-name> \
--query "[?name=='AzureMonitorWindowsAgent' || name=='AzureMonitorLinuxAgent'].{Name:name,Version:typeHandlerVersion,State:provisioningState}" \
-o table
# Trigger extension upgrade to the patched build
az vm extension set \
--resource-group <rg-name> \
--vm-name <vm-name> \
--name AzureMonitorWindowsAgent \
--publisher Microsoft.Azure.Monitor \
--enable-auto-upgrade true
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


