Skip to content
Path traversal Advisory Intermediate CVE-2026-40400

Windows PowerShell Remote Code Execution Vulnerability (CVE-2026-40400)

A relative path traversal flaw in Windows PowerShell lets an authenticated attacker execute code over a network. The attack requires the victim to click a link, after which an unauthenticated attacker can trigger remote code execution.

Quan Le Follow with PuH4ck3rX, YMsora and 4 others

Originally disclosed on Microsoft

High 8.0 View original

Description

Relative path traversal in Windows PowerShell allows an authorized attacker to execute code over a network.

FAQ

According to the CVSS metric, the attack vector is network (AV:N) and the user interaction is required (UI:R). What is the target context of the remote code execution? This attack requires an authenticated client to click a link so that an unauthenticated attacker can initiate remote code execution.

Windows PowerShell

Windows PowerShell

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Quan Le from Unit 515 - OPSWAT. 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

Impact

An unauthenticated attacker could execute code remotely, but only after an authenticated victim clicks a link.

What the attacker needed

Victim is authenticated; victim clicks a link; network access to the target

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.

Path traversal is when a program follows a file path that can be manipulated to reach places it should not. Here, that mistake in Windows PowerShell could let someone run their own code on a victim's machine, but only if the victim clicks a link while logged in.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.