CVE-2025-21187

7.8 HIGH

📋 TL;DR

This vulnerability allows remote code execution in Microsoft Power Automate through improper control of generation of code (CWE-94). Attackers could execute arbitrary code on affected systems by crafting malicious inputs. Organizations using vulnerable versions of Power Automate are affected.

💻 Affected Systems

Products:
  • Microsoft Power Automate
Versions: Specific vulnerable versions would be detailed in Microsoft's advisory
Operating Systems: Windows Server (when Power Automate is installed on-premises), Cloud-hosted Power Automate
Default Config Vulnerable: ⚠️ Yes
Notes: Both cloud and on-premises deployments may be affected. Check Microsoft's advisory for exact version details.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the Power Automate server, allowing attackers to execute arbitrary commands, access sensitive data, and move laterally within the network.

🟠

Likely Case

Attackers gain initial foothold in the environment, potentially leading to data exfiltration, credential theft, or deployment of ransomware.

🟢

If Mitigated

Limited impact due to network segmentation, least privilege access, and monitoring controls preventing lateral movement.

🌐 Internet-Facing: HIGH if Power Automate is exposed to the internet, as this could allow direct exploitation without internal access.
🏢 Internal Only: MEDIUM as attackers would need internal network access, but once obtained, exploitation could lead to significant impact.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of Power Automate's code generation mechanisms and likely some level of access to the system.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check Microsoft's monthly security updates for Power Automate

Vendor Advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-21187

Restart Required: No

Instructions:

1. Review Microsoft's security advisory for CVE-2025-21187. 2. Apply the latest security updates for Power Automate through your update management system. 3. For cloud deployments, ensure you're on the latest service version. 4. Verify the update was successful.

🔧 Temporary Workarounds

Network Segmentation

all

Restrict network access to Power Automate servers to only necessary users and systems

Principle of Least Privilege

all

Ensure Power Automate service accounts have minimal necessary permissions

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach Power Automate servers
  • Enable enhanced logging and monitoring for suspicious activities related to Power Automate

🔍 How to Verify

Check if Vulnerable:

Check your Power Automate version against Microsoft's security advisory for CVE-2025-21187

Check Version:

For on-premises: Check Power Automate server version in control panel or via PowerShell. For cloud: Check version in Power Platform admin center.

Verify Fix Applied:

Verify that your Power Automate version matches or exceeds the patched version specified in Microsoft's advisory

📡 Detection & Monitoring

Log Indicators:

  • Unusual process creation from Power Automate service
  • Suspicious PowerShell or command execution events
  • Failed authentication attempts to Power Automate

Network Indicators:

  • Unexpected outbound connections from Power Automate servers
  • Anomalous traffic patterns to/from Power Automate ports

SIEM Query:

source="PowerAutomate" AND (process_creation OR command_execution) AND severity=high

🔗 References

📤 Share & Export