Skip to content
RCE Advisory Advanced CVE-2017-8565

Windows PowerShell Remote Code Execution Vulnerability (CVE-2017-8565)

A remote code execution vulnerability existed in PowerShell when PSObject wraps a CIM Instance, allowing an attacker to execute malicious code in a PowerShell remote session. The update corrects how PowerShell deserializes user-supplied scripts.

Oleksandr Mirosh Follow

Originally disclosed on Microsoft

High 7.5 View original

Description

A remote code execution vulnerability exists in PowerShell when PSObject wraps a CIM Instance. An attacker who successfully exploited this vulnerability could execute malicious code on a vulnerable system. In an attack scenario, an attacker could execute malicious code in a PowerShell remote session. The update addresses the vulnerability by correcting how PowerShell deserializes user supplied scripts.

Microsoft PowerShell

Microsoft PowerShell

The original report as published on the Microsoft Security Response Center, by Oleksandr Mirosh and Alvaro Muñoz ( @pwntester ) from Hewlett-Packard Enterprise Security. 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 deserialize user-supplied scripts when a PSObject wraps a CIM Instance, allowing malicious code execution.

Impact

An attacker could execute malicious code on a vulnerable system in a PowerShell remote session.

What the attacker needed

PowerShell remote session access

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 tool for running commands and scripts on Windows. This bug meant that if an attacker could send a specially crafted script to a PowerShell remote session, they could run their own harmful code on the machine. The fix changed how PowerShell handles such scripts so they cannot be abused.

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.