Currently when configuring a new file field for a content type users are easily (perhaps unintentionally) able to leave out the allowed list of extensions. This allows any extension and results in a huge security hole. It should be decided whether this feature should be kept. This might be critical. I'll leave it up to others to decide that.

If it stays then there should atleast be a warning since this is not much different than saying "I want insecure uploads." Drupal should also make a best effort to deal with any file types that could be used to exploit Drupal and its files (ie: php, cgi, etc) when a content type is allowing all extensions -- I must mention that Drupal does this already via checking the uploaded file for a short list of dangerous extensions before the file is saved (this is a best effort only, it's difficult if not impossible to cover everything).

If it is decided that file extensions must be explicitly listed then this check for dangerous extensions is no longer needed (Some people apparently feel this way). If a Drupal site admin wants users to upload PHP files with the php extension then Drupal should not get in their way.

Quote from file field's configuration page: "Separate extensions with a space or comma and do not include the leading dot. Leaving this blank will allow users to upload a file with any extension."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Title: File field shouldnt allow any file extension to be uploaded when the list of allowed extensions is left blank » File field shouldn't allow any file extension to be uploaded when the list of allowed extensions is left blank
Priority: Normal » Critical

Coupled with #693084: Regression: file_munge_filename() extension handling broken by move to File Field this is a release-blocking critical security regression from D6. I'm not saying we necessarily have to fix both, but we can't ship until at least one is resolved. Since that one's now postponed pending the outcome of this, this is critical.

I absolutely think this feature cannot be designed to fail unsafe like this. If left blank, it should probably be a validation error. If you actually want all extensions to be uploaded, you should have to type in something like <insecure-allow-all>. Or, it could be a magic little UI using #states where the first choice is a drop-down with "restrict extentions" and "allow all extensions (WARNING: insecure -- only give to fully trusted administrators)", defaults to "restrict", and only if you select the other one does the text area for extensions disappear.

And/or, the field of allowed extensions should default to some small list of common, known-safe extensions (txt, png, etc), sort of like the default list of allowed tags in the filtered HTML text format...

Or something. ;) I don't care that much about exactly what the new UI looks like, but IMHO we should make it hard to configure a file field like this, not the default behavior if you don't think about it.

The target audience of D7UX are exactly the kind of people who we can't expect to be savvy about such things, and who should either be forced to think about this, or better yet, get a safe default and only think about it if they run into trouble and need to go out of their way to expand the allowed list. And there should always be warnings if something's configured wide-open.

chx’s picture

Weird! function file_field_info() says

      'instance_settings' => array(
        'file_extensions' => 'txt',

and so why is that not picked up by

  $settings = $instance['settings'];


  // Make the extension list a little more human-friendly by comma-separation.
  $extensions = str_replace(' ', ', ', $settings['file_extensions']);
  $form['file_extensions'] = array(

a cursory check of file.crud.inc and file.info.inc does not reveal anything...

dhthwy’s picture

txt is the default which gets overridden and the extension validator removed completely if you remove "txt" and leave the text box for extensions blank on the file field configuration page.

modules/file/file.field.inc

 function file_field_widget_upload_validators($field, $instance)
 // Add the extension check if necessary.
  if (!empty($instance['settings']['file_extensions'])) {
    $validators['file_validate_extensions'] = array($instance['settings']['file_extensions']);
  }

  return $validators;
sun’s picture

dhthwy’s picture

Here is what I propose. This is the most sensible solution I can think of atm.

a) Provide a configurable default list of extensions in admin/config/media/file-system.

b) File field's configuration form will reflect this default list of extensions.

I see two ways of doing this for b):

1) Prepopulate the form's extensions text box with the list of default extensions.
-or-
2) Leave the text box blank and provide a message below it that says something like "If left blank then the following extensions will be used [list_here]"

I prefer option 2). Option 1) probably still needs to show the user the list of default extensions and so 2) will be less redundant.

c) Either make file_validate_extensions be a required key in the validators array for file uploads and return an error when it doesn't exist (should never happen for behaving code) -or- Don't return an error. Add file_validate_extensions to the validators array if it is missing and populate it with the default extension list in a).

Essentially then we're only allowing white listed extensions, so we won't need to bother checking for dangerous ones anymore.

dww’s picture

Generally, I believe that having to rely on a blacklist for site security is a bad idea, since new vulnerabilities will always creep up. So I'm much more in favor of putting effort into making the whitelist better, making it fail safe instead of failing unsafe, etc.

However, I don't think it'd be terrible to have a blacklist of currently-known-to-be-vulnerable extensions that we can use to generate warnings when a whitelist is configured to allow them. This blacklist could even be populated with an info/alter hook, so that it'd be easier to maintain via contrib as D7 gets older (although a contrib to make your site more secure isn't terribly useful -- the vast majority of not-security-conscious users will never know to install it). So, this is all potentially scope creep from the critical regression here.

Cheers,
-Derek

dhthwy’s picture

How about having two configurable lists @ admin/config/media/file-system. A white and a black extension list.

The file_validate_extensions() validator can ensure the whitelisted extension is not also in the blacklist. If it is in the blacklist, then it'll return an error. If the site admin really wants to allow the blacklisted extension then they'll have to first remove it from the blacklist. A message on the form @ admin/config/media/file-system can tell them how dangerous those extensions are and even force them to confirm if they remove anything from that list. It also has the added benefit of giving site admins the power to control how secure their extensions are by letting them add to the blacklist.

dww’s picture

@#7: No, that's just confusing (and likely to defeat the purpose of a blacklist when people misconfigure it). There's no point asking the site admins themselves to configure the blacklist, if the only point of the blacklist is to warn site admins if they're configuring something in a known-insecure configuration. ;)

The blacklist (if it exists at all) should be controlled by core (and possibly extended by knowledgeable contrib maintainers) and should only be used to warn site admins about file fields that are configured to allow known-to-be-insecure extensions.

We need to make sure this UI fails safe and is secure by default. We want to keep the UI as simple as possible. The more complicated we make this, the more likely it is that people will misconfigure it. Ideally, no one ever has to touch any of this -- they start with a secure default that Just Works(tm). But, if they go changing it, we should make it hard for them to configure it insecurely, and nag them when they do. The smaller number of knobs and levers we can accomplish this with, the better.

tstoeckler’s picture

From a UI perspective, we would need:

  1. An agreed upon list of safe extensions.
  2. Make that list the default when adding file fields/instances.
  3. Optional: When someone enters a known-to-be-insecure extention show a little yellow warning saying: "Warning: What you are doing is not safe! Don't do it unless you really (!) know what you are doing!"
  4. Basically 2. is the only thing that needs a bit of work, as 1 shouldn't be too hard and could be revised later as well if we just start off with e.g. txt.

dhthwy’s picture

Well for starters here is what is used in Drupal 6 for its default list:
"jpg jpeg gif png txt html?? doc xls pdf ppt pps odt ods odp"

IMO it doesn't have to be a long list if it is to be configurable. My point of view is that this list is merely a convenience -- so that users won't have to type these in manually. Prepopulating the form with a long list might be irritating to some because if they wish to specify only one or two they'll first have to delete most if not all. And if they want them all, it could just be left blank and let Drupal do it for them. I think I've already said this, just like to reiterate that.

We could use one of the usability experts to chime in. We already have two? security team members participating. I'd like to get CHX and SUN'S opinion too. The faster we come up with a consensus the faster we can begin work on a patch for this ugly. If I'm going to be the one to write it, I'm fine with attempting it, but only after given the go-ahead.

If anyone thinks my proposal in #5 will work please do speak up and let us know your opinion of the options I provided there. Much of #5 is based on comments I've read from the other issue this stemmed from. We need a clear path to a solution, and soon :)

sun’s picture

1) Can we clarify whitelist and blacklist, please? IIRC from the other issue, then the whitelist is a whitelist, but the blacklist is not a blacklist at all, it's just a "mungelist" -- the file upload is still accepted, just the filename is hi-jacked.

2) Somewhat depending on 1), I'd agree with the very first statement in #1: Only ever allow a whitelist for file extensions, and #require it. You always need to enter what you want. But: Make it so a contributed module can come and remove #required.

3) Regarding defaults and UX, the default should be what it's now: Just .txt - otherwise, people tend to don't think at all and just leave the defaults. Better make them think here.

dhthwy’s picture

re: 1)

Blacklist is just a label I gave it as another way of saying "Bad file". To me, how these files are handled is separate. You want to munge it, deny it, rename to .txt, put a dress on it, whatever it is done to it, it's still a bad file. There are two file extension lists that Drupal currently checks: one is a list of safe files to allow, and one is a short list of Drupal 'exploitables' (php, cgi, pl, py) that gets renamed to filename.txt. It's that list that I refer to as blacklist. I understand your need for clarification on that due to the new label I slapped on it.

But if a site admin wants to allow a potentially hazardous extension such as .php for uploading, then Drupal shouldn't come along and ruin their day by always renaming it to .txt or munging it up. What dww and tstoeckler are saying is that if a site admin reallly wants to allow it, then ensure Drupal doesn't make it too easy for them. Give them a warning, ask them for a confirmation ("Do you reallly want to do this? this could be very bad.")

There are reasons one might want to allow such extensions. For example, If I had a Drupal site where I uploaded some of my own personal PHP scripts, I should be able to upload them to Drupal without Drupal hijacking it. Because *I* trust my own files.

Is this fine with everyone?

re: 2)

File extension validation is handled by the $validators array and its key 'file_validate_extensions'. The key 'file_validate_extensions' is itself an array composed of extensions to allow. File field uses that for #upload_validators, which populates the file_validate_extensions array with the extensions the user wants. That's how extensions are being validated right now, just so everyone's clear on that. Anything *not* in that list will be rejected. If a contrib module wants to alter that list, then they should be able to.

re: 3)

That's simple enough and makes perfect sense to me. If you want to allow an extension then you must be explicit.

catch’s picture

I agree with sun that we should make that list required, and leave .txt as the default. Seems like that would fix the issue here, very easily, at which point the file munging on the other issue could be reopened no?

mradcliffe’s picture

I like simple solutions like this. Is there a benefit to doing this in validate instead of #required for usability?

dhthwy’s picture

Status: Needs review » Active
FileSize
4.23 KB

The change to the preg_match was necessary because if php and foo extensions are being allowed and someone uploads foo.php.foo then neither the rename to .txt or munge will happen and their Drupal site can now be exploited since .foo is an unknown file type.

So now it matches .php. or .php(end of line), I think that's a correct regexp I used in the patch but if not please let me know :)

Instead of having warnings if someone wants to allow php, it'll just do what it does currently and rename to .txt and let the user know what it did. If someone really wants to allow it, then they need to set the allow_insecure_uploads variable.

Also the reason I put the check for allow_insecure_uploads instead of on the same if condition as the preg_match is so that check will only need to be done if the preg_match finds a match.

Anyway, I think I covered all the bases, if not please tell. Thanks for all the input so far peoples.

dhthwy’s picture

Status: Active » Needs review
mradcliffe’s picture

Status: Active » Needs review
FileSize
4.5 KB

I was going to add "You must whitelist all allowed extensions for this upload field." to the end of #description of the file_extensions element. So I modified the patch in #14 a bit.

Status: Needs review » Needs work

The last submitted patch, 803926-17.patch, failed testing.

mradcliffe’s picture

How the heck did 17 get less fails than 14 when they're the same code? Testing clients #33 and #32?

dhthwy’s picture

Status: Needs work » Needs review

I don't know. I'm not surprised though. In order to make Drupal secure we made file extension validation a requirement to file_save_upload. Drupal as of right now, supports allowing any extensions to be uploaded and its tests and code expect that I guess. This changes the API.

dhthwy’s picture

Status: Needs review » Needs work
dhthwy’s picture

Status: Needs work » Needs review
FileSize
4.16 KB

Took out the requirement and made it fallback to a list of safe extensions. Let's see if this passes.

NaheemSays’s picture

Do we want "zip" in there too? it is common enough.

sun’s picture

Status: Needs review » Needs work
+++ ../drupalnew/includes/file.inc	2010-05-21 11:12:58.000000000 -0400
@@ -1167,28 +1167,38 @@ function file_save_upload($source, $vali
+  if (!in_array('file_validate_extensions', array_keys($validators))) {

!isset()

+++ ../drupalnew/includes/file.inc	2010-05-21 11:12:58.000000000 -0400
@@ -1167,28 +1167,38 @@ function file_save_upload($source, $vali
+    $validators['file_validate_extensions'] = array('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp');
...
+  $extensions = implode(' ', $validators['file_validate_extensions']);

Why implode? It always seems to be [0]

+++ ../drupalnew/includes/file.inc	2010-05-21 11:12:58.000000000 -0400
@@ -1167,28 +1167,38 @@ function file_save_upload($source, $vali
+  if (preg_match('/\.(php|pl|py|cgi|asp|js)\.|$/i', $file->filename) && (substr($file->filename, -4) != '.txt')) {
+	if (!variable_get('allow_insecure_uploads', 0)) {

The variable_get() should be the first and primary condition for the entire block.

Note: Patch contains tabs.

+++ ../drupalnew/includes/file.inc	2010-05-21 11:12:58.000000000 -0400
@@ -1167,28 +1167,38 @@ function file_save_upload($source, $vali
+      drupal_set_message(t('For security reasons, your upload has been renamed to %filename.', array('%filename' => $file->filename)));

An API function should not set messages. This needs to be moved elsewhere, I think.

+++ ../drupalnew/modules/file/file.field.inc	2010-05-21 09:18:52.000000000 -0400
@@ -545,10 +546,16 @@ function file_field_widget_upload_valida
-  // Add the extension check if necessary.
+  // 'file_extensions' is required so it should not be empty.
+  // However if it is we can't return an error here
+  // so we fallback to the default extension setting.

Should wrap at 80 chars, not before. This comment needs to be clarified, since no one else will understand what is meant with "it's required, *should* not be empty", since required stuff always is non-empty, because that is the sole purpose of #required in the first place.

Furthermore, the fallback to the default file field configuration needs to be reasonably explained.

76 critical left. Go review some!

dhthwy’s picture

Status: Needs work » Needs review

The list is really to be determined. But the thing is, any code written with security in mind needs to tell file_save_upload the extensions it will accept, so Drupal can properly do its validation check. This is very easy to do. Any code/modules that don't do that should be considered insecure.

dhthwy’s picture

Status: Needs review » Needs work
dhthwy’s picture

@ #24

sun, there are lots of drupal_set_messages in file_save_upload including the functions (file_munge_filename) it calls.

"Should wrap at 80 chars, not before. This comment needs to be clarified, since no one else will understand what is meant with "it's required, *should* not be empty", since required stuff always is non-empty, because that is the sole purpose of #required in the first place."

I'll take it out.

dhthwy’s picture

No details in the latest failed test? wtf?

dhthwy’s picture

FileSize
3.77 KB
dhthwy’s picture

Status: Needs work » Needs review
FileSize
3.77 KB

Stupid regexp was causing atleast most of those tests to fail. I left the drupal_set_message because there's a lot of others in that function and I don't know where else to put it.

Status: Needs review » Needs work

The last submitted patch, 803926-14-3.patch, failed testing.

mradcliffe’s picture

You're also missing the line I added as noted in #17.

dhthwy’s picture

FileSize
3.9 KB

mradcliffe, personally I don't mind, but I have a feeling others won't like that change. The field is the whitelist and is already marked required so they have to put something there anyway. Nothing stopping you from re-patching and getting it reviewed. I'll add it to the patch tho if someone else agrees with you that it should be added. Let's wait till it passes the testbot first.

This one should work.

dhthwy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 803926-14-4.patch, failed testing.

dhthwy’s picture

"File exists after uploading a file with no extension checking" will never pass because it tests with a .gif which is in the fallback whitelist for when there's no extensions passed in. It will likely pass if gif is taken out. Which could make other tests fail since part of Drupal and its tests expect extension validation to be required and the other parts expect extension validation TO NOT BE REQUIRED. This absolutely does not make any sense. Wtf.

For example, aggregator test does not pass in any extensions so xml must be added to the fallback list in order for it to pass.

dhthwy’s picture

Status: Needs work » Postponed

Nor will the translation stuff in locale.test ever pass because

$name = tempnam(file_directory_path('temporary'), "po_");

generates a random file with no extension. Looks like we have another issue to open and another to postpone yay!

sun’s picture

Status: Postponed » Needs work

Wait. This issue is talking file field, file.module, not "any other file save operation that happens anywhere in Drupal" -- that may mean to remove those @todo + following lines from file_save_upload(), as they may be applied unintentionally globally without having a file field in any scope, and move the munging to a new validator, or similar, although that is the topic of the other issue... - Are we perhaps running in circles here? :-/

dhthwy’s picture

Every file uploaded to Drupal reaches file_save_upload() eventually, so this hits on every file save operation, which is why we're getting failed tests -- there are tests that expect file validation, and tests that don't expect it. However you can't validate jack without a file extension and the locale tests use no extensions for its files when it does a file upload. These are supposed to be .po files (for the locale tests), but they don't include the .po extension.

file_save_upload() is what calls the various validator functions. Like I said in one of my other comments, file_save_upload() is the last stop before the file gets saved, so any validation/munging is a really good place for it to happen. Since there's no common "inbetween" functions, so no other commonly called function in the flow to say -- hey let's pass this to a validator before heading to file_save_upload() _as far as I know of_, I could be wrong there.

The issue dww referenced in #2 which this stems from requires changes to file_save_upload() like the ones I made for that one to be fixed. And then all that's needed in that issue is to make the update.manager pass in the list of extensions to file_save_upload() for validation, which is the same thing #upload_validators eventually does.

dhthwy’s picture

Yea, this isn't just about file field, this is really a global problem. You can't munge filenames without first having a list of extensions to allow. That's why it's important for them to be required, and if they don't exist, fallback to some default safe list or simply return an error. In #693084 the module installer's files were getting munged because a) it wasn't passing in a list of extensions and b) the default safe list contained an unconfigurable variable didn't include tar and gz.

BUT the list of extensions passed in to file_save_upload isn't even checked until later on - just before it gets saved. Whereas the munging happens well before that, so the only list being provided to the munger is that default safe list I mention in b). So files are getting munged even if their extensions pass validation. This affects all file saving globally. Not just the update.manager or file field.

dhthwy’s picture

FileSize
4.23 KB

If I understand things correctly then this should pass tests. There is no default whitelist fallback, because that won't pass the tests indicated in #36 and #37. According to the API doc for file_save_upload validators is optional, so if there's no extensions provided, then any will be accepted (the tests expect this behavior apparently). This patch also mostly fixes #693084 (update.manager's module installer still needs a patch to pass in a list of archive types so it won't try to install non-archives).

re again #38:

In file_save_upload() munging needs to happen before the validators because it changes the filename. The file object isn't completely built until $file->destination gets set. $file->destination depends on a 'finished' filename, so if it's going to get changed for any reason, it needs to happen before that.

Also the validators get called after the file object is completely built. You can't really put them before $file->destination is set because the caller may pass in a validator for the file's destination.

dhthwy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 803926-14-5.patch, failed testing.

dhthwy’s picture

The change to #required for file field is causing that test to fail. So this is really postponed until that test is updated. I don't know whether I can upload a patch which changes a test. I wish I could test myself, but I keep getting irritating database is locked exceptions from PDO.

dhthwy’s picture

FileSize
808 bytes

Ok I made a mistake when I made these patches. The issue with file_save_upload() and its munging is a different issue as sun was trying to tell me. So this is a very simple patch to make the file extensions form setting required by default in core when adding/managing a file field. Sun, catch, and dww all agree that this should be required for security reasons.

The test in #41 was failing because it was passing in an empty list of extensions to the file extension validator resulting in a failed upload. File field should have turned off the validation check if the list was empty ( this is what Drupal does currently, and something I had changed in the previous patch ).

And I'm not saying extension(s) anymore.

dhthwy’s picture

Status: Needs work » Needs review
catch’s picture

I can't really follow what happened in the last few posts, seems like it went in circles at least twice, but the last patch is what I imagined this would look like, and tests are passing.

dhthwy’s picture

haha sorry. I did muddy this up one pretty badly. The problem with the munging in file_save_upload() can also affect file field uploads (files getting munged even if they're on the allowed list) which is why I kept trying to upload a patch that fixes that too, but it doesn't belong here I guess.

sun’s picture

This looks RTBC for me now. However, do we have a test that ensures that a contributed module is able to empty that filefield extensions setting, without triggering notices or warnings somewhere in the call stack? (in other words: do we have a test that empties that setting via field API, i.e., circumventing the #required ?)

dhthwy’s picture

sun, yea, the test that failed in #41 would be the same thing you're talking about, and it passes now.

sun’s picture

Status: Needs review » Reviewed & tested by the community
+++ ../drupalnew/modules/file/file.field.inc	2010-05-22 13:55:21.000000000 -0400
@@ -544,11 +545,7 @@ function file_field_widget_upload_valida
-  // Add the extension check if necessary.
-  if (!empty($instance['settings']['file_extensions'])) {
-    $validators['file_validate_extensions'] = array($instance['settings']['file_extensions']);
-  }
+  $validators['file_validate_extensions'] = array($instance['settings']['file_extensions']);

Alrighty, I see now that the previous patch additionally attempted to always validate extensions, even when empty, which is not in the scope of this issue.

The goal of this issue is to disallow stock core file fields to be configured without any file extension list by default. However, contributed modules should still be able to "re-allow" that potentially unsafe configuration, by removing the #required, and possibly squeezing in further validators or do whatever.

We possibly want to move the remaining changes from the previous patch to the originating filename munging issue, since always validating and/or munging file extensions (and its current brokenness), regardless of filefield or raw file uploads, is exactly the point of that issue.

Powered by Dreditor.

mradcliffe’s picture

Status: Reviewed & tested by the community » Needs work

-1 on RBTC. Still needs proper documentation.

YesCT’s picture

mradcliffe, specifically what kind of documentation? Is there a particular hunk of code that needs comments?

mradcliffe’s picture

The form has a completely inadequate description now.

dhthwy’s picture

The form field for extensions is marked required. The description then tells them to enter their list of extensions. If they attempt to enter nothing, they get an error stating that the field is required and to enter an extension to allow. I don't see how this is inadequate.

mradcliffe’s picture

I think an explanation about the potential security risk would be beneficial as this was a security-related issue.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
944 bytes

New patch with in-line code documentation as to why this is marked as required.

catch’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Looks good! Committed to HEAD! :)

I'm not sure I follow mradcliffe's concerns... it's no longer possible to upload any file extension through the UI, so I'm not sure why we need extra verbiage there? And the field is called "Allowed file extensions." I think it's pretty clear..?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kououken’s picture

I don't mean to reopen a solved issue, but for me, and I'm sure many others, there are certain use cases in which an option to allow ALL extensions should be available if desired.

The current implementation is a problem for me for the following reasons:

  • Extension field is limited to 128 characters

    Assuming all extensions are 3 chars + 1 space, that is at most 32 extensions maximum which may be whitelisted. Half of that number is taken up by common video file extensions alone. ie: "3g2 2gp asf asx avi flv mov mp4 mpg mpeg rm swf vob wmv" = 55 chars. If one intends to make a general file attachment field, then you will of course need to include a large number of document formats (MS Office, MS Office XML, Open Office, etc.), image formats, archives, etc. In any case, the hard limit is quickly reached in any attempt to "whitelist" all often-used, and safe, file extensions.

  • Lack of an option to allow all extensions (or use a black-list) implies that there are no Drupal use cases warranting such a feature.

    My site is a single-user environment with no file-upload permissions for site visitors, therefore there is no need for filtering of upload extensions. I appreciate the developers improving Drupal security by preventing often-used security holes from being abused by users. However, as a site owner, I choose to use Drupal as a CMS not because it is the easiest to set up or because it "Just Works". I use it because of its adaptability and ease of customization.

Please note that I have no problem with a default configuration that prevents the upload of dangerous files such as php, cgi, pl, py, etc. I do, however, think that it isn't a good idea for developers to decide for all Drupal users whether or not to allow file extensions across-the-board. That is a decision that should be left up to the web administrators, ideally with some appropriate descriptions of the various options and their pros/cons, much like the public/private file upload system selection.

For your consideration.

Best regards,
Daniel

tstoeckler’s picture

@kououken: Since this issue has been discussed and committed I think it makes sense to open a new issue for your (probably valid) concern. Thanks!

AaronBauman’s picture

Came to this closed ticket from top google hit.
Here's the issue against 8.x: #997900: Not possible to allow uploading files with any file extension

Until then, you can install a new module to work around this restriction:
http://drupal.org/project/allow_all_file_extensions

Sup dawg, I heard you like modules...