Windows PowerShell Remote Code Execution Vulnerability (CVE-2026-124225)
Windows PowerShell could parse a non-2xx HTML response from an attacker-controlled URL through MSHTML without showing the usual security confirmation prompt. An attacker who convinced a victim or automated process to fetch such a URL could then run embedded script inside the invoking PowerShell process.
Description
Improper control of generation of code ('code injection') in Windows PowerShell allows an unauthorized attacker to execute code locally.
FAQ
How could an attacker exploit this vulnerability? An attacker could convince a victim, or cause a victim-controlled automated process, to invoke Invoke-WebRequest against an attacker-controlled URL. By returning a specially crafted non-2xx HTML response, the attacker could cause Windows PowerShell to parse the response through MSHTML without displaying the security confirmation prompt, which could execute embedded script in the invoking PowerShell process.
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.
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 HTML response was handed to the MSHTML engine for parsing without the security confirmation prompt that should gate script execution.
Impact
An attacker could execute code locally in the invoking PowerShell process, though the text notes the attack vector is local and requires user interaction.
What the attacker needed
Victim runs Invoke-WebRequest; attacker-controlled URL; user interaction required
How it was found
- Get the victim or an automated process to run Invoke-WebRequest against an attacker-controlled URL.
- Return a specially crafted non-2xx HTML response from that URL.
- PowerShell parses the response through MSHTML without the security prompt, running the embedded script.
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. One of its commands can download a web page, and normally Windows asks for confirmation before running any script found in that page. Here that confirmation was skipped, so a booby-trapped page could run code on the machine of whoever downloaded it.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.