Skip to content
RCE Advisory Intermediate CVE-2026-124225

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.

hongzh0 Follow

Originally disclosed on Microsoft

High 7.8 View original

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

The original report as published on the Microsoft Security Response Center, by hongzh0 with Beijing Networkbench Co., Ltd.. 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 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

  1. Get the victim or an automated process to run Invoke-WebRequest against an attacker-controlled URL.
  2. Return a specially crafted non-2xx HTML response from that URL.
  3. 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.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.