Skip to content
Access control Advisory Intermediate CVE-2025-25004

PowerShell Elevation of Privilege Vulnerability (CVE-2025-25004)

An improper access control flaw in Microsoft PowerShell lets an authenticated attacker place a malicious file in a custom module path. When a privileged .NET application later starts a PowerShell session as NT AUTHORITY\SYSTEM, the attacker's file can be loaded, allowing file creation, modification or deletion with SYSTEM rights.

Casper Follow with tsuki

Originally disclosed on Microsoft

High 7.3 View original

Description

Improper access control in Microsoft PowerShell allows an authorized attacker to elevate privileges locally.

FAQ

What privileges could be gained by an attacker who successfully exploited the vulnerability? An attacker who successfully exploited this vulnerability could create, modify, or delete files in the security context of the "NT AUTHORITY\SYSTEM" account.

FAQ

According to the CVSS metric, user interaction is required (UI:R) and privileges required is Low (PR:L). What does that mean for this vulnerability? An authenticated attacker could place a malicious file in a specified custom module path and then wait for a user to run a privileged .NET application that starts a PowerShell session under NT AUTHORITY\SYSTEM privileges

Microsoft PowerShell

Microsoft PowerShell

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Casper. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, PowerShell did not properly restrict who can place files in a custom module path that is later loaded by a session running as NT AUTHORITY\SYSTEM.

Impact

An attacker could create, modify or delete files with the rights of the NT AUTHORITY\SYSTEM account, but only after a user runs a privileged .NET application that starts a PowerShell session.

What the attacker needed

Authenticated local access; write access to a custom module path; victim runs privileged .NET app

How it was found

  1. An authenticated attacker places a malicious file in a specified custom module path.
  2. The attacker waits for a user to run a privileged .NET application that starts a PowerShell session under NT AUTHORITY\SYSTEM privileges.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

PowerShell is a command-line tool built into Windows. It can load extra code from folders called module paths. Here, a normal logged-in user could put a file in one of those folders, and when a more powerful program started PowerShell with the highest Windows permissions, that file could run with those permissions. That means the user could change or delete protected files they should not be able to touch.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.