diff --git a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php
index a8904e6..d744e19 100644
--- a/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php
+++ b/core/lib/Drupal/Core/Render/BareHtmlPageRenderer.php
@@ -74,6 +74,10 @@ protected function renderBarePage(array $content, $title, array $page_additions,
     // information about this; the exact same pattern is used there and
     // explained in detail there.
     drupal_render_root($html['page']);
+
+    // Add the bare minimum of attachments from the system module and the
+    // current maintenance theme.
+    system_page_attachments($html['page']);
     return drupal_render($html);
   }
 
diff --git a/core/modules/system/src/Tests/System/SystemAuthorizeTest.php b/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
index 2fd4d6e..6f63a45 100644
--- a/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
+++ b/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
@@ -59,5 +59,8 @@ function testFileTransferHooks() {
     $this->assertRaw('System Test FileTransfer');
     // Make sure the settings form callback works.
     $this->assertText('System Test Username');
+    // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and
+    // metatags as expected to the first page of the authorize.php script.
+    $this->assertRaw('core/misc/states.js');
   }
 }
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 9334a88..fed7c49 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -528,6 +528,7 @@ function system_page_attachments(array &$page) {
   // Ensure the same CSS is loaded in template_preprocess_maintenance_page().
   $page['#attached']['library'][] = 'core/normalize';
   $page['#attached']['library'][] = 'system/base';
+  $page['#attached']['library'][] = 'core/drupal.states';
   if (\Drupal::service('router.admin_context')->isAdminRoute()) {
     $page['#attached']['library'][] = 'system/admin';
   }
