Index: src/wp-admin/includes/file.php
===================================================================
--- src/wp-admin/includes/file.php	(revision 34669)
+++ src/wp-admin/includes/file.php	(working copy)
@@ -318,7 +318,14 @@
 			$file['name'] = $proper_filename;
 		}
 		if ( ( ! $type || !$ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
-			return call_user_func( $upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' ) );
+				/**
+				 * Filter the error type when a disallowed file type upload has been attempted.
+				 *
+				 * @since 4.4.0
+				 *
+				 * @param string $var Default error message: "Sorry, this file type is not permitted for security reasons."
+				 */
+			return call_user_func( $upload_error_handler, $file, apply_filters( 'upload_filetype_error', __( 'Sorry, this file type is not permitted for security reasons.' ) ) );
 		}
 		if ( ! $type ) {
 			$type = $file['type'];
