Index: src/wp-admin/includes/post.php
===================================================================
--- src/wp-admin/includes/post.php	(revision 29010)
+++ src/wp-admin/includes/post.php	(working copy)
@@ -1010,6 +1010,49 @@
 }
 
 /**
+ * Allow 'meta_query' to persist during wp().
+ *
+ * @since 4.0.0
+ * @access private
+ *
+ * @param array $q Query vars constructed during WP->parse_request().
+ * @return array The altered query vars.
+ */
+function _wp_filter_attachment_search( $q ) {
+	remove_filter( 'request', __FUNCTION__ );
+
+	$q['meta_query'] = array(
+		'relation' => 'OR',
+		array(
+			'key' => '_wp_attached_file',
+			'value' => $q['s'],
+			'compare' => 'LIKE'
+		)
+	);
+	return $q;
+}
+
+/**
+ * Filter meta SQL to mark this search criteria as optional.
+ *
+ * @since 4.0.0
+ * @access private
+ *
+ * @param array $sql WHERE and JOIN SQL clauses.
+ * @return array The filtered clauses.
+ */
+function _wp_filter_attachment_meta_sql( $sql ) {
+	remove_filter( 'get_meta_sql', __FUNCTION__ );
+
+	// @todo Explain what is happening here.
+	if ( 0 === strpos( $sql['where'], ' AND (' ) ) {
+		list( $_, $clauses ) = explode( ' AND ', $sql['where'], 2 );
+		$sql['where'] = " OR ({$clauses})";
+	}
+	return $sql;
+}
+
+/**
  * Executes a query for attachments. An array of WP_Query arguments
  * can be passed in, which will override the arguments set by this function.
  *
@@ -1053,6 +1096,11 @@
 	if ( isset($q['detached']) )
 		$q['post_parent'] = 0;
 
+	if ( ! empty( $q['s'] ) ) {
+		add_filter( 'request', '_wp_filter_attachment_search' );
+		add_filter( 'get_meta_sql', '_wp_filter_attachment_meta_sql' );
+	}
+
 	wp( $q );
 
 	return array($post_mime_types, $avail_post_mime_types);
