How to allow any file extension (or use a blacklist instead of a whitelist) for file fields in Drupal 8?
Implement a hook alter on the node form or the field level and  in it change the validator to your custom function:

/**
 * alter form field element:.
 * 
 * Implements hook_FORM_alter
 */
function my_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $upload_validators = array(
        'my_module_file_validate_extensions_blacklist' =&gt; ['jpg jpeg gif png mp4']
    );
    $form['your_file_field_element']['#upload_validators'] = $upload_validators;

}


Alternatively you can change the behavior of the field on any node, or entity by altering the widget form:

function mymodule_field_widget_form_alter(&amp;$element, &amp;$form_state, $context) {  
   if ( "condition to check if it's your field" == TRUE) {
     $upload_validators = array(
            'my_module_file_validate_extensions_blacklist' =&gt; ['jpg jpeg gif png mp4']
        );
        $element['#upload_validators'] = $upload_validators;
  }
}


Then write you own function to do what you want:

function my_module_file_validate_extensions_blacklist(stdClass $file, $extensions) {
  $errors = array();
  $regex = '/\\.(' . preg_replace('/ +/', '|', preg_quote($extensions)) . ')$/i';
  if (preg_match($regex, $file-&gt;filename)) {
    $errors[] = t('files with the following extensions are not allowed: %files-allowed.', array(
      '%files-allowed' =&gt; $extensions,
    ));
  }
  return $errors
}