PowerShell Remote Code Execution Vulnerability (CVE-2025-54100)
Windows PowerShell did not properly neutralise special elements used in a command, so a crafted web page parsed by Invoke-WebRequest could cause script code to run. An attacker could use social engineering to convince a victim to fetch such content, leading to code execution on the victim's machine.
Osman Eren Güneş Follow with DeadOverflow
Originally disclosed on Microsoft
Description
Improper neutralization of special elements used in a command ('command injection') in Windows PowerShell allows an unauthorized attacker to execute code locally.
FAQ
Is there more information I need to know after I install the Security Updates to address this vulnerability? After you install the updates, when you use the Invoke-WebRequest command you will see the following confirmation prompt with security warning of script execution risk: Security Warning: Script Execution Risk Invoke-WebRequest parses the content of the web page. Script code in the web page might be run when the page is parsed. RECOMMENDED ACTION: Use the -UseBasicParsing switch to avoid script code execution. Do you want to continue? For additional details, see KB5074596: PowerShell 5.1: Preventing script execution from web content .
FAQ
According to the CVSS metric, the attack vector is local (AV:L). Why does the CVE title indicate that this is a remote code execution? The word Remote in the title refers to the location of the attacker. This type of exploit is sometimes referred to as Arbitrary Code Execution (ACE). The attack itself is carried out locally. For example, when the score indicates that the Attack Vector is Local and User Interaction is Required , this could describe an exploit in which an attacker, through social engineering, convinces a victim to download and open a specially crafted file from a website which leads to a local attack on their computer.
FAQ
After I install security update 5074204 or 5074353 will a reboot be required? Yes. After you install Security Update 5074204 or 5074353, you will be required to reboot your system. Note that your PowerShell session itself does not require a reboot unless a particular utility DLL is loaded in memory during the session. Consistent with previous updates, only the presence of certain DLLs in use might trigger a reboot prompt.
Windows PowerShell
Windows PowerShell
Microsoft
Microsoft
Customer Action Required
Yes
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 the command failed to neutralise special elements in web content it parsed, allowing embedded script to be executed rather than treated as plain data.
Impact
An attacker could execute code locally on a victim's machine, but only with user interaction such as convincing the victim to download and open crafted content.
What the attacker needed
Victim uses Invoke-WebRequest on crafted content; social engineering to convince the victim
The fix
It was fixed by security updates that add a confirmation prompt warning of script execution risk when Invoke-WebRequest parses web content, with the recommended action being to use the basic parsing switch.
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 tool built into Windows. One of its commands, Invoke-WebRequest, downloads a web page and reads it, and it could end up running script code hidden in that page. An attacker would need to trick someone into fetching a malicious page, after which code could run on that person's computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.