Skip to content
Path traversal Write-up Intermediate

Microsoft Intune, Version 1.55.48.0 Advisory

Microsoft Intune Management Extension called an external executable without quoting its full path, allowing a local user with write access to the root of the C: drive or C:\Program Files (x86) to place a malicious executable that would be run in the context of another user. This could lead to privilege escalation or lateral movement.

Ben Lincoln Follow

Published on bishopfox.com

The following document describes identified vulnerabilities in the Microsoft Intune application, version 1.55.48.0.

Ben Lincoln (@0x00C651E0), on bishopfox.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application constructed a command line for an external executable without enclosing the executable path in quotation marks, so Windows could interpret spaces in the path as argument separators and search for a different executable.

Impact

A local user with write access to the affected directories could execute code as another user, potentially leading to horizontal or vertical privilege escalation, though in default Windows configurations only administrators have such write access.

What the attacker needed

Write access to C:\ or C:\Program Files (x86); Intune Management Extension installed; wait for scheduled script execution

The fix

The vulnerability should be fixed by enclosing the executable path in quotation marks when building the command line, as is done elsewhere in the product.

How it was found

  1. Copy a command interpreter executable to C:\Program.exe.
  2. Wait for Intune to execute PowerShell scripts, which triggers the unquoted call.
  3. Observe the malicious process running in Task Manager.

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 write-up has not been written yet. The Original tab links to the source.

When Windows starts a program, it sometimes tries several possible file paths if the full path is not in quotes. If an attacker can put a file with a name like 'Program.exe' in a location Windows checks first, that file runs instead of the intended program. Here, because the path to a helper program was not quoted, a user who can write to the root of the C: drive could make their own program run with higher privileges.

What is Path traversal?

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

More by Ben Lincoln

View all

1 more disclosed report, best first.

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.