Skip to content
File upload Write-up Intermediate

Microsoft IIS Semi-Colon Vulnerability

Microsoft IIS mishandled filenames containing a semicolon between two extensions, so a file named with .asp before a semicolon and .jpg after it was executed as ASP rather than treated as an image. An attacker who could upload a file could therefore run server-side ASP code despite an upload restriction to JPG files.

soroush.me

Published on soroush.me

I found a vulnerability in Microsoft IIS when I was searching about a method to execute an ASP file when we can only upload a JPG file.

The author, on soroush.me

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

Impact

An attacker who can upload files could execute ASP code on the server, bypassing a restriction that only allowed JPG uploads.

What the attacker needed

Ability to upload a file; upload restricted to JPG files; IIS server running ASP

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.

A web server decides what to do with an uploaded file by looking at its extension, the part after the last dot. IIS got confused by a semicolon in the name and treated a file that looked like an image as an active script, so the server ran the attacker's code instead of just storing a picture.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.