diff --git a/core/modules/system/src/SystemConfigSubscriber.php b/core/modules/system/src/SystemConfigSubscriber.php
index 3c0de5f..7e8b477 100644
--- a/core/modules/system/src/SystemConfigSubscriber.php
+++ b/core/modules/system/src/SystemConfigSubscriber.php
@@ -78,6 +78,54 @@ public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {
   }
 
   /**
+   * Checks for any pending database updates.
+   *
+   * As pending database update can cause issues as they potentially make
+   * changes code base and database.
+   *
+   * @see https://www.drupal.org/node/2628144
+   *
+   * @param ConfigImporterEvent $event
+   *   The config import event.
+   */
+  public function onConfigImporterValidateDatabaseUpdate(ConfigImporterEvent $event) {
+    if ($this->hasModuleUpdates()) {
+      $event->getConfigImporter()->logError($this->t('Pending database updates available.'));
+    }
+  }
+
+  /**
+   * Checks if there any pending database updates.
+   *
+   * @return bool
+   *   TRUE, if there any pending update on modules, FALSE otherwise.
+   */
+  protected function hasModuleUpdates() {
+    // Check installed modules.
+    $has_pending_updates = FALSE;
+    foreach (\Drupal::moduleHandler()->getModuleList() as $module => $filename) {
+      $updates = drupal_get_schema_versions($module);
+      if ($updates !== FALSE) {
+        $default = drupal_get_installed_schema_version($module);
+        if (max($updates) > $default) {
+          $has_pending_updates = TRUE;
+          break;
+        }
+      }
+    }
+    if (!$has_pending_updates) {
+      /** @var \Drupal\Core\Update\UpdateRegistry $post_update_registry */
+      $post_update_registry = \Drupal::service('update.post_update_registry');
+      $missing_post_update_functions = $post_update_registry->getPendingUpdateFunctions();
+      if (!empty($missing_post_update_functions)) {
+        $has_pending_updates = TRUE;
+      }
+    }
+
+    return $has_pending_updates;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public static function getSubscribedEvents() {
@@ -86,6 +134,7 @@ public static function getSubscribedEvents() {
     // there is no configuration to import.
     $events[ConfigEvents::IMPORT_VALIDATE][] = array('onConfigImporterValidateNotEmpty', 512);
     $events[ConfigEvents::IMPORT_VALIDATE][] = array('onConfigImporterValidateSiteUUID', 256);
+    $events[ConfigEvents::IMPORT_VALIDATE][] = array('onConfigImporterValidateDatabaseUpdate', 255);
     return $events;
   }
 
diff --git a/core/modules/system/src/Tests/Update/UpdatePendingConfigImportTest.php b/core/modules/system/src/Tests/Update/UpdatePendingConfigImportTest.php
new file mode 100644
index 0000000..8853171
--- /dev/null
+++ b/core/modules/system/src/Tests/Update/UpdatePendingConfigImportTest.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace Drupal\system\Tests\Update;
+
+/**
+ * Tests config imports with pending updates.
+ *
+ * @group Update
+ */
+class UpdatePendingConfigImportTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
+      __DIR__ . '/../../../tests/fixtures/update/drupal-8.update-test-config-import.php',
+    ];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function doSelectionTest() {
+    parent::doSelectionTest();
+    $this->assertRaw('<ul><li>8001 -  Pending update. </li></ul>');
+  }
+
+  /**
+   * Tests database update with configuration import.
+   */
+  public function testConfigImport() {
+    try {
+      // Try running config import with pending.
+      $this->configImporter()->import();
+    }
+    catch (\Exception $e) {
+      $this->assertTrue(strpos('Pending database updates available.', $e->getMessage()));
+    }
+
+    // Run database updates.
+    $this->runUpdates();
+    $this->drupalGet('update.php/selection');
+    $this->assertText('No pending updates.');
+
+    // Try running config import with pending.
+    $this->configImporter()->import();
+    $this->assertNoRaw('Pending database updates available.');
+    $this->assertNoRaw('There were errors validating the config synchronization.');
+  }
+
+}
diff --git a/core/modules/system/tests/fixtures/update/drupal-8.update-test-config-import.php b/core/modules/system/tests/fixtures/update/drupal-8.update-test-config-import.php
new file mode 100644
index 0000000..f3e5180
--- /dev/null
+++ b/core/modules/system/tests/fixtures/update/drupal-8.update-test-config-import.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @file
+ * Partial database to mimic the installation of the update_test_post_update
+ * module.
+ */
+
+use Drupal\Core\Database\Database;
+
+$connection = Database::getConnection();
+
+// Set the schema version.
+$connection->merge('key_value')
+  ->condition('collection', 'system.schema')
+  ->condition('name', 'update_test_config_import')
+  ->fields([
+    'collection' => 'system.schema',
+    'name' => 'update_test_config_import',
+    'value' => 'i:8000;',
+  ])
+  ->execute();
+
+// Update core.extension.
+$extensions = $connection->select('config')
+  ->fields('config', ['data'])
+  ->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute()
+  ->fetchField();
+$extensions = unserialize($extensions);
+$extensions['module']['update_test_config_import'] = 8000;
+$connection->update('config')
+  ->fields([
+    'data' => serialize($extensions),
+  ])
+  ->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute();
diff --git a/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.info.yml b/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.info.yml
new file mode 100644
index 0000000..faf112f
--- /dev/null
+++ b/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.info.yml
@@ -0,0 +1,5 @@
+core: 8.x
+name: Update test config import
+type: module
+package: Testing
+version: VERSION
diff --git a/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.install b/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.install
new file mode 100644
index 0000000..11ec5e3
--- /dev/null
+++ b/core/modules/system/tests/modules/update_test_config_import/update_test_config_import.install
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @file
+ * Install hooks for test module.
+ */
+
+/**
+ * Pending update.
+ */
+function update_test_config_import_update_8001() {
+}
