#106735Upload of csv files not possible after security update
Description
After today’s security update to 12.4.31, the upload of simple CSV files no longer works because the MIMI type validation has been tightened.
Error:
Upload of file “test.csv” failed!
Mime-type “text/plain” not allowed for file extension “csv”
Explicitly allowing this MIME type with the following configuration prevents the second of the two error messages, but still does not allow the upload.
‘SYS’ => [
‘FileInfo’ => [
‘fileExtensionToMimeType’ => [
‘csv’ => [‘text/plain’],
],
],
],
The problem is that the standard MIME type of CSV files is not text/csv but text/plain.
Reviews 23
- 12.4 90651[TASK] Extend allowed list of uploadable text/misc files
- 13.4 90650[TASK] Extend allowed list of uploadable text/misc files
- main 90575[TASK] Extend allowed list of uploadable text/misc files
- 12.4 90596[TASK] Add more common MIME type replacements and file extensions
- 13.4 90595[TASK] Add more common MIME type replacements and file extensions
- main 89987[TASK] Add more common MIME type replacements and file extensions
- main 90577[TASK] Extend allowed list of uploadable `mediafile_ext` files
- 12.4 89879[BUGFIX] Improve allowed MIME type handling, add vcf handling
- 13.4 89878[BUGFIX] Improve allowed MIME type handling, add vcf handling
- main 89779[BUGFIX] Improve allowed MIME type handling, add vcf handling
- 12.4 89677[BUGFIX] Evaluate mixed-case file extensions in mime_type migration
- 13.4 89676[BUGFIX] Evaluate mixed-case file extensions in mime_type migration
- main 89603[BUGFIX] Evaluate mixed-case file extensions in mime_type migration
- 12.4 89680[BUGFIX] Fix upload of encrypted Office Open XML documents
- 13.4 89679[BUGFIX] Fix upload of encrypted Office Open XML documents
- main 89678[BUGFIX] Fix upload of encrypted Office Open XML documents
- main 89559[BUGFIX] Add mime-type compatiblity mapping for .exe
- 12.4 89561[BUGFIX] Add mime-type compatiblity mapping for .exe
- 13.4 89560[BUGFIX] Add mime-type compatiblity mapping for .exe
- 12.4 89553[BUGFIX] Fix file uploads where concrete MIME types can't be determined
- 13.4 89552[BUGFIX] Fix file uploads where concrete MIME types can't be determined
- main 89519[BUGFIX] Fix file uploads where concrete MIME types can't be determined
- main 89492[TASK] Update MimeTypeCollection for .csv => text/plain compatibility
Related issues 6
- Bug #106775Missing mime type for .exe
- Bug #106794MimeTypeCompatibilityTypeGuesser breaks FE on AWS S3 websites
- Bug #106805SysFileMimeTypeMigration fails if extension in uppercase
- Bug #106819Upload of password protected office documents not possible - Mime-type "application/encrypted" not allowed for file extension "docx".
- Bug #106916Allow MIME type 'text/vcard' for .vcf file uploads in file list
- Task #107033Add more mime type mappings for common files
Files 2
History 3144
Show 1419 earlier messages
-
Gerrit Code Review pushed patch set 1 for main to change 89492 status
NewUnder Review <span data-processor="relativetime" data-value="2025-05-20T21:11:08+00:00" > 05/20/25, 21:11 </span> -
Gerrit Code Review pushed patch set 2 for main to change 89492 <span data-processor="relativetime" data-value="2025-05-21T06:55:27+00:00" > 05/21/25, 06:55 </span>
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-21T07:32:48+00:00" > 05/21/25, 07:32 </span>
Can you add application/vnd.openxmlformats-officedocument.presentationml.presentation for some MS PowerPoint files to that list?
I’ve tried to upload a ppsx file (and other PowerPoint file types like potx etc.) with that MIME type, but only pptx is listed for that MIME type in /sysext/core/Classes/Resource/MimeTypeCollection.phpThe translation for the error message isn’t translated to german yet, btw.
-
Gerrit Code Review pushed patch set 3 for main to change 89492 <span data-processor="relativetime" data-value="2025-05-21T08:12:26+00:00" > 05/21/25, 08:12 </span>
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-21T08:46:21+00:00" > 05/21/25, 08:46 </span>
I also have a .xls file where Windows Explorer says it has a MIME type of “application/vnd.ms-excel”, and yet TYPO3 rejects it with this error message:
Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xls".
-
Albrecht Köhnlein commented <span data-processor="relativetime" data-value="2025-05-21T10:01:46+00:00" > 05/21/25, 10:01 </span>
I have another one:
*.potxis recognized asapplication/vnd.openxmlformats-officedocument.presentationml.presentationon my server, while TYPO3 expectsapplication/vnd.openxmlformats-officedocument.presentationml.templateAnd one more:
image/jpegis missing at least one file extension:*.jfif> However, it is still registered as “image/jpeg”
-
Albrecht Köhnlein commented <span data-processor="relativetime" data-value="2025-05-21T10:08:23+00:00" > 05/21/25, 10:08 </span>
Maybe it would be a solution to allow system maintainer to define additional file extensions for the mime types. And I think
SYS/FileInfo/fileExtensionToMimeTypedoes not a good job in this case.If I would define
'SYS' => [ 'FileInfo' => [ 'fileExtensionToMimeType' => [ 'jfif' => 'image/jpeg', ], ], ],this would mean, that the mime type of
this-is-a-png-with-wrong-file-extension.jfifwould be overwritten from correct “image/png” to incorrect “image/jpeg” -
Benjamin Franzke commented <span data-processor="relativetime" data-value="2025-05-21T10:14:09+00:00" > 05/21/25, 10:14 </span>
Florian Seirer wrote in #note-5:
> Can you add application/vnd.openxmlformats-officedocument.presentationml.presentation for some MS PowerPoint files to that list?
> I’ve tried to upload a ppsx file (and other PowerPoint file types like potx etc.) with that MIME type, but only pptx is listed for that MIME type in /sysext/core/Classes/Resource/MimeTypeCollection.phpHm.. So using an example file – https://github.com/NicolasCARPi/example-files/blob/master/example.ppsx – both PHP detectors report
application/vnd.openxmlformats-officedocument.presentationml.presentation, which is actually the pptx mimetype [1].php > echo mime_content_type('example.ppsx'); application/vnd.openxmlformats-officedocument.presentationml.presentation php > echo finfo_file(new finfo(), 'example.ppsx', FILEINFO_MIME_TYPE); application/vnd.openxmlformats-officedocument.presentationml.presentationIANA (which is mime-db’s source) actually defines a separate mime-type for ppsx [2]:
application/vnd.openxmlformats-officedocument.presentationml.slideshowGiven this anomalies I fear we’ll have many more cases like these popping up in the next days :\
[1] https://www.iana.org/assignments/media-types/application/vnd.openxmlformats-officedocument.presentationml.presentation#:https://www.iana.org/assignments/media-types/application/vnd.openxmlformats-officedocument.presentationml.slideshow#::text=File%20extension(s)%20%3A%20ppsx
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-21T14:14:43+00:00" > 05/21/25, 14:14 </span>
Another one:
Mime-type "text/plain" not allowed for file extension "css".
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-21T14:55:43+00:00" > 05/21/25, 14:55 </span>
Not necessarily related to this bug, but to the new MIME type check in general: As the reports module now goes through every file in /fileadmin/, this could take a while for bigger sites. I barely avoided a timeout on our biggest installation (over 300k files), and got over 1000 MIME type warnings (some of them true, some false. I haven’t checked that yet). This might deserve another ticket, I just wanted to let you know.
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-05-21T19:54:17+00:00" > 05/21/25, 19:54 </span>
Just to note this here too, failures for me:
.opml
.rss
.ttf -
Benjamin Franzke commented <span data-processor="relativetime" data-value="2025-05-23T05:56:48+00:00" > 05/23/25, 05:56 </span>
Florian Seirer wrote in #note-7:
> I also have a .xls file where Windows Explorer says it has a MIME type of “application/vnd.ms-excel”, and yet TYPO3 rejects it with this error message:
>Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xls".Can you verify if this is really an
*.xlsfile?
@*.xls@ upload works for me.
The mimetype that is reported in your error message looks like you were actually uploading axlsx file.
Maybe someone renamed xlsx to xls? -
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-23T06:42:26+00:00" > 05/23/25, 06:42 </span>
You’re right. After renaming the file to *.xlsx I was able to upload it. Not sure why anyone would rename .xlsx to .xls, but I have no control over that.
I guess you can cross that off the list.As for the PowerPoint files:
I just created a PowerPoint presentation in PowerPoint 2024 and saved it in different file types:
.ppt, .pptx and .pps were uploaded just fine, but .pptm, .potx, .ppsm, .ppsx and .potm were not.Mime-type "application/vnd.openxmlformats-officedocument.presentationml.presentation" not allowed for file extension "potx". Mime-type "application/vnd.openxmlformats-officedocument.presentationml.presentation" not allowed for file extension "potm". Mime-type "application/vnd.openxmlformats-officedocument.presentationml.presentation" not allowed for file extension "ppsm". Mime-type "application/vnd.openxmlformats-officedocument.presentationml.presentation" not allowed for file extension "ppsx". Mime-type "application/vnd.openxmlformats-officedocument.presentationml.presentation" not allowed for file extension "pptm".
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-23T07:16:34+00:00" > 05/23/25, 07:16 </span>
Test files created in Word 2024:
Mime-type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" not allowed for file extension "dotm". Mime-type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" not allowed for file extension "docm". Mime-type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" not allowed for file extension "dotx".
Test files created in Excel 2024:
Mime-type "text/plain" not allowed for file extension "csv". Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xlsb". Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xlsm". Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xltm". Mime-type "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" not allowed for file extension "xltx".
-
Florian Seirer changed attached MS Office Upload Test.zip <span data-processor="relativetime" data-value="2025-05-23T07:27:44+00:00" > 05/23/25, 07:27 </span>
-
Stefan Terborg commented <span data-processor="relativetime" data-value="2025-05-23T10:05:52+00:00" > 05/23/25, 10:05 </span>
What about container files like mp4 or ogg? It should be possible to add an array of mime types for a file extension:
'SYS' => [ 'FileInfo' => [ 'fileExtensionToMimeType' => [ 'mp4' => ['audio/mp4','video/mp4'], 'ogg' => ['application/ogg','audio/ogg','video/ogg'], ], ], ], -
Gerrit Code Review pushed patch set 1 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T08:53:02+00:00" > 05/26/25, 08:53 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T08:54:40+00:00" > 05/26/25, 08:54 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T08:55:14+00:00" > 05/26/25, 08:55 </span>
-
Benjamin Franzke commented <span data-processor="relativetime" data-value="2025-05-26T11:57:54+00:00" > 05/26/25, 11:57 </span>
Stefan Terborg wrote in #note-18:
> What about container files like mp4 or ogg? It should be possible to add an array of mime types for a file extension:Do you actually face any issues with these files? I could not reproduce..
-
Gerrit Code Review pushed patch set 4 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T11:58:11+00:00" > 05/26/25, 11:58 </span>
-
Stefan Terborg commented <span data-processor="relativetime" data-value="2025-05-26T12:00:55+00:00" > 05/26/25, 12:00 </span>
Benjamin Franzke wrote in #note-22:
> Stefan Terborg wrote in #note-18:
> > What about container files like mp4 or ogg? It should be possible to add an array of mime types for a file extension:
>
> Do you actually face any issues with these files? I could not reproduce..Yes, when I have an audio mp4 it gets noticed in the report.
-
Gerrit Code Review pushed patch set 5 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T15:32:48+00:00" > 05/26/25, 15:32 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T15:39:21+00:00" > 05/26/25, 15:39 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 89519 <span data-processor="relativetime" data-value="2025-05-26T15:40:22+00:00" > 05/26/25, 15:40 </span>
-
Oliver Hader changed parent task #106772 <span data-processor="relativetime" data-value="2025-05-26T19:26:30+00:00" > 05/26/25, 19:26 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89552 <span data-processor="relativetime" data-value="2025-05-27T04:43:24+00:00" > 05/27/25, 04:43 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 89553 <span data-processor="relativetime" data-value="2025-05-27T04:45:10+00:00" > 05/27/25, 04:45 </span>
-
Benjamin Franzke commented <span data-processor="relativetime" data-value="2025-05-27T04:47:09+00:00" > 05/27/25, 04:47 </span>
Stefan Terborg wrote in #note-24:
> Yes, when I have an audio mp4 it gets noticed in the report.In the reports module or while uploading a new mp4 file? Please share (obfuscated) screenshots. We need to know, what mimetype it was detected as.
Also try to execute
file yourfile.mp4(on a unix/WSL shell) and post the result, to verify it’s actually a valid mp4 container. -
Gerrit Code Review pushed patch set 2 for 12.4 to change 89553 <span data-processor="relativetime" data-value="2025-05-27T05:07:07+00:00" > 05/27/25, 05:07 </span>
-
Benjamin Franzke commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-05-27T06:15:10+00:00" > 05/27/25, 06:15 </span>Applied in changeset commit:b4937aa23c43799041bfbec8cf259cb18d609837.
-
Oliver Hader changed Related to #106775 <span data-processor="relativetime" data-value="2025-05-27T08:07:27+00:00" > 05/27/25, 08:07 </span>
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-28T09:16:09+00:00" > 05/28/25, 09:16 </span>
After updating to 12.4.32 and running the upgrade wizard I have found 50 additional MIME type errors in the reports module (consistency status check). Reopen this ticket or create a new one?
-
Stefan Terborg commented <span data-processor="relativetime" data-value="2025-05-28T12:21:31+00:00" > 05/28/25, 12:21 </span>
I’m getting error messages with uppercase extensions:
File extension "PNG" is not in the list of allowed values
Are lowercase extensions required for files?
-
Florian Seirer commented <span data-processor="relativetime" data-value="2025-05-28T12:27:41+00:00" > 05/28/25, 12:27 </span>
Stefan Terborg wrote in #note-36:
> I’m getting error messages with uppercase extensions:
>
> […]
>
> Are lowercase extensions required for files?This was fixed in #106738. Have you updated to 12.4.32 yet?
-
Garvin Hicking changed Related to #106794 <span data-processor="relativetime" data-value="2025-05-29T15:40:47+00:00" > 05/29/25, 15:40 </span>
-
Garvin Hicking changed Related to #106805 <span data-processor="relativetime" data-value="2025-06-02T10:56:08+00:00" > 06/02/25, 10:56 </span>
-
Garvin Hicking changed Related to #106819 <span data-processor="relativetime" data-value="2025-06-04T09:27:23+00:00" > 06/04/25, 09:27 </span>
-
Vivek Solanki commented <span data-processor="relativetime" data-value="2025-06-16T07:34:28+00:00" > 06/16/25, 07:34 </span>
Hello here,
I’m having the same problem with the CSV file
Mime-type “text/html” not allowed for file extension “csv”.
If anyone has a solution related to this, can you please share?
Thanks!
-
Albrecht Köhnlein commented <span data-processor="relativetime" data-value="2025-06-16T14:08:37+00:00" > 06/16/25, 14:08 </span>
A “csv” file which is detected as “text/html” smells like a problem outside of TYPO3. Are you sure, it really is a CSV file and not a HTML file?
Nevertheless, you could configure TYPO3 to handle “text/html” with file type “csv” as “text/csv”
$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['mimeTypeCompatibility']['text/html']['csv'] = 'text/csv';
-
Garvin Hicking changed Related to #106916 <span data-processor="relativetime" data-value="2025-06-20T12:27:46+00:00" > 06/20/25, 12:27 </span>
-
Garvin Hicking changed Related to #107033 <span data-processor="relativetime" data-value="2025-07-04T08:24:02+00:00" > 07/04/25, 08:24 </span>
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T13:59:11+00:00" > 12/02/25, 13:59 </span>
csvshould be added to the mime-type generation script fortext/plain.