Skip to content
RCE Advisory Advanced CVE-2023-36049

Microsoft .NET FormatFtpCommand CRLF Injection Arbitrary File Write and Deletion Vulnerability

The FormatFtpCommand method in Microsoft .NET fails to neutralise CRLF sequences, allowing an attacker to inject commands into FTP server interactions. This could let an attacker create or delete arbitrary files on the FTP server.

Piotr Bazydło Follow

Originally disclosed on Zero Day Initiative

High 7.6 View original

This vulnerability allows remote attackers to create or delete arbitrary files on FTP servers implemented using affected versions of Microsoft .NET. Interaction with the .NET framework is required to exploit this vulnerability but attack vectors may vary depending on the implementation.

Piotr Bazydlo (@chudypb) of Trend Micro Zero Day Initiative, 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 FormatFtpCommand method does not properly sanitise user-supplied input, allowing CRLF sequences to be injected into FTP commands.

Impact

An attacker could create or delete arbitrary files on the FTP server, but exploitation requires interaction with the .NET framework and may depend on the specific implementation.

What the attacker needed

FTP server built with affected .NET; attacker can influence FTP command input

The fix

Microsoft has issued an update to correct this vulnerability.

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.

FTP servers use commands to manage files. If a program builds these commands without properly handling special line-break characters, an attacker can sneak in extra commands. This could let them create or delete files on the server.

What is RCE?

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

More by Piotr Bazydło

View all

232 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.

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.