diff --git a/vendor/magento/module-customer/Model/Session.php b/vendor/magento/module-customer/Model/Session.php
index d8a813266b06a..0ae9fcb642629 100644
--- a/vendor/magento/module-customer/Model/Session.php
+++ b/vendor/magento/module-customer/Model/Session.php
@@ -108,8 +108,11 @@ class Session extends \Magento\Framework\Session\SessionManager
     private $accountConfirmation;
 
     /**
-     * Session constructor.
-     *
+     * @var CustomerRegistry
+     */
+    private $customerRegistry;
+
+    /**
      * @param \Magento\Framework\App\Request\Http $request
      * @param \Magento\Framework\Session\SidResolverInterface $sidResolver
      * @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig
@@ -132,6 +135,7 @@ class Session extends \Magento\Framework\Session\SessionManager
      * @param GroupManagementInterface $groupManagement
      * @param \Magento\Framework\App\Response\Http $response
      * @param AccountConfirmation $accountConfirmation
+     * @param CustomerRegistry|null $customerRegistry
      * @throws \Magento\Framework\Exception\SessionException
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -157,7 +161,8 @@ public function __construct(
         CustomerRepositoryInterface $customerRepository,
         GroupManagementInterface $groupManagement,
         \Magento\Framework\App\Response\Http $response,
-        ?AccountConfirmation $accountConfirmation = null
+        ?AccountConfirmation $accountConfirmation = null,
+        ?CustomerRegistry $customerRegistry = null,
     ) {
         $this->_coreUrl = $coreUrl;
         $this->_customerUrl = $customerUrl;
@@ -173,6 +178,9 @@ public function __construct(
         $this->response = $response;
         $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance()
             ->get(AccountConfirmation::class);
+        $this->customerRegistry = $customerRegistry ?: ObjectManager::getInstance()
+            ->get(CustomerRegistry::class);
+
         parent::__construct(
             $request,
             $sidResolver,
@@ -429,7 +437,7 @@ public function checkCustomerId($customerId)
         }
 
         try {
-            $this->customerRepository->getById($customerId);
+            $this->customerRegistry->retrieve($customerId);
             $this->_isCustomerIdChecked = $customerId;
             return true;
         } catch (\Exception $e) {

