It looks like this issue will be addressed in WordPress Core version 5.0.3 currently. That will most likely be released in the new year. Until then, I believe either the plugin mentioned above, or this snippet is a valid workaround for now:
add_filter('wp_check_filetype_and_ext', function($values, $file, $filename, $mimes) {
if ( extension_loaded( 'fileinfo' ) ) {
// with the php-extension, a CSV file is issues type text/plain so we fix that back to
// text/csv by trusting the file extension.
$finfo = finfo_open( FILEINFO_MIME_TYPE );
$real_mime = finfo_file( $finfo, $file );
finfo_close( $finfo );
if ( $real_mime === 'text/plain' && preg_match( '/\.(csv)$/i', $filename ) ) {
$values['ext'] = 'csv';
$values['type'] = 'text/csv';
}
} else {
// without the php-extension, we probably don't have the issue at all, but just to be sure...
if ( preg_match( '/\.(csv)$/i', $filename ) ) {
$values['ext'] = 'csv';
$values['type'] = 'text/csv';
}
}
return $values;
}, PHP_INT_MAX, 4);
If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Thanks!