Questions tagged [mime-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Is it bad to upload a file with an extension like .sh.jpg in FastAPI?

Let's say I have a file named or foo.exe.jpg. FastAPI automatically assigns a content-type: image/jpeg in both cases so if you check the MIME type you technically have an image. I wanted to ...
PythonSmellsLikeCheese's user avatar
4 votes
2 answers

Is mime-sniffing still something to protect against with modern browsers (with X-Content-Type-Options)?

I have read about X-Content-Type-Options and it says often that it protects against IE mime sniffing problems. I am wondering if in 2021 it is still valid and a problem for modern browsers? In other ...
Ilya Chernomordik's user avatar
0 votes
0 answers

How to intercept application specific MIME types used by 3rd party (Windows) browser/plugins apps?

I'm trying to intercept and decipher scripted code that is sent to a previously installed Windows application, after a user have clicked on a particular URL in their web browser which is somehow ...
not2qubit's user avatar
  • 275
1 vote
0 answers

Letting attacker control content-type, why is this safe?

I found a strange behavior of Shopify, where an attacker can change the extension on a URL and the backend will send back an HTTP content-type matching that extension, for each of these extensions: ...
Gavin Wahl's user avatar
3 votes
2 answers

Is it necessarily Content spoofing if the content type of the response does not match the content type of the request?

The security team of my company is stating that content spoofing occurs when they send a different "content-type" for an HTTP request that only accepts JSON content type, and the server response is an ...
theeDude's user avatar
1 vote
1 answer

Is XSS via MIME sniffing a Stored or Reflected XSS?

The title says it all. I understand how to exploit XSS via MIME sniffing, but the question is, do you call this type of XSS stored or reflected? OWASP says Stored attacks are those where the ...
Izy-'s user avatar
  • 873
2 votes
2 answers

File upload not checking on mime type

So, I have an upload functionality where extension of the filetype is checked correctly (and not currently bypassable). But the mime type is not checked. Does this leave me with some residual risk or ...
Wealot's user avatar
  • 879
3 votes
3 answers

MIME Type vs. Magic Numbers

I'm interested in a comparison of the two with regards to what's more secure when uploading files on a website (that I'm a programmer for). Mozilla's page about MIME Types states that "On the Web, ...
nsaigal's user avatar
  • 31
8 votes
1 answer

MIME types that allow XSS in modern browsers

Assume that it is possible to host arbitrary files on, which are delivered with an attacker-controlled MIME type and X-Content-Type-Options=nosniff. Which MIME types allow for XSS when ...
Fabian Meumertzheim's user avatar
1 vote
2 answers

Why is " Generic MIME used" a security vulnerability?

Some web application security scanners like Skipfish reports vulnerability "Generic MIME used". In my case this vulnerability was reported for resources like http://my_site/fonts/fontawesome-webfont....
user187205's user avatar
  • 1,293
1 vote
0 answers

Writing an automated browser - is it risky to accept downloads of any mime type?

Background about my app I have a browser macro-recording app built with Selenium. Basically users can use Firefox like normal and record their actions into macros to replay. Question In Selenium, ...
max pleaner's user avatar
1 vote
1 answer

Secure Image Upload, or Bypassing PHP mime-type Check

When securing image uploads there are basically three approaches I know of (of course, ideally, all three are used): check file extension store uploaded files in non-executable directory outside the ...
tim's user avatar
  • 29.5k