Skip to content
Misconfiguration Advisory Intermediate

(0Day) Microsoft Windows dir Command Improper Character Neutralization Vulnerability

The built-in dir command on Microsoft Windows mishandles filenames containing invalid characters, so a crafted filename can make the terminal show misleading text and visual effects. An attacker could use this to deceive a user into performing dangerous actions, though the vendor did not accept it as a vulnerability.

st4nly0n Follow

Originally disclosed on Zero Day Initiative

This vulnerability allows remote attackers to display misleading terminal output on affected installations of Microsoft Windows. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

St4nly0n, on the Zero Day Initiative

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

How it worked

Root cause

Likely the dir command does not properly neutralise or escape invalid characters in filenames before printing them to the terminal, so the characters are interpreted as display control rather than plain text.

Impact

An attacker could display misleading terminal output and deceive a user into performing dangerous actions, but user interaction is required and the vendor judged the behaviour not to be a vulnerability.

What the attacker needed

Victim opens a malicious file or page; crafted filename with invalid characters

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.

The dir command lists the files in a folder and prints their names in a terminal window. If a file is named with unusual characters, the terminal can be tricked into printing text that looks like something else, such as a fake warning or prompt. A person reading that output might then do something harmful because they trust what the screen shows.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by st4nly0n

View all

2 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.