diff --git a/composer.lock b/composer.lock
index 72e7315510..657f5f8442 100644
--- a/composer.lock
+++ b/composer.lock
@@ -534,7 +534,7 @@
             "dist": {
                 "type": "path",
                 "url": "core",
-                "reference": "107b1d4f65408eb2844facd227005517de15343b"
+                "reference": "5b727fa9039220c3a128b9abd0c7a26e111bc6de"
             },
             "require": {
                 "asm89/stack-cors": "^1.1",
@@ -763,7 +763,8 @@
                     "lib/Drupal/Core/Site/Settings.php"
                 ],
                 "files": [
-                    "includes/bootstrap.inc"
+                    "includes/bootstrap.inc",
+                    "includes/guzzle_php81_shim.php"
                 ]
             },
             "scripts": {
diff --git a/core/composer.json b/core/composer.json
index 17365aabdb..027e6527f9 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -202,7 +202,8 @@
             "lib/Drupal/Core/Site/Settings.php"
         ],
         "files": [
-            "includes/bootstrap.inc"
+            "includes/bootstrap.inc",
+            "includes/guzzle_php81_shim.php"
         ]
     },
     "config": {
diff --git a/core/includes/guzzle_php81_shim.php b/core/includes/guzzle_php81_shim.php
new file mode 100644
index 0000000000..6b967ee0af
--- /dev/null
+++ b/core/includes/guzzle_php81_shim.php
@@ -0,0 +1,31 @@
+<?php
+
+// phpcs:ignoreFile
+
+namespace GuzzleHttp;
+
+/**
+ * Generates URL-encoded query string.
+ *
+ * This shim exists to make Guzzle 6 PHP 8.1 compatible.
+ *
+ * @link https://php.net/manual/en/function.http-build-query.php
+ *
+ * @param object|array $data
+ *   May be an array or object containing properties.
+ * @param string|null $numeric_prefix
+ *   (optional) If numeric indices are used in the base array and this parameter
+ *   is provided, it will be prepended to the numeric index for elements in
+ *   the base array only.
+ * @param string|null $arg_separator [optional] <p>
+ *   (optional) arg_separator.output is used to separate arguments, unless this
+ *   parameter is specified, and is then used.
+ * @param int $encoding_type
+ *   (optional) By default, PHP_QUERY_RFC1738.
+ *
+ * @return string
+ *   A URL-encoded string.
+ */
+function http_build_query($data, $numeric_prefix = '', $arg_separator = '&', $encoding_type = \PHP_QUERY_RFC1738) {
+  return \http_build_query($data, is_null($numeric_prefix) ? '' : $numeric_prefix, $arg_separator, $encoding_type);
+}
