79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Drupal Core Installer Reinstall RCE (CVE-2026-132165)

Drupal's installer can treat an unverifiable database as a fresh site and let an unauthenticated visitor reinstall it; fixed in 11.4.13, 11.3.22 and 10.6.22.

TL;DR

  • Drupal's installer can treat a database it cannot verify as an empty site. Under specific conditions, an unauthenticated visitor can then reinstall the site and take it over, which can lead to remote code execution.
  • Drupal 10.6 before 10.6.22, 11.0 through 11.3.21 and 11.4.0 through 11.4.12 are affected. Fixed releases 10.6.22, 11.3.22 and 11.4.13 shipped on 2026-11-18.
  • Drupal rates the flaw critical at 18 out of 25, with exploitation rated complex: a proof of concept exists. No attacks are reported and the CVE is not in CISA KEV as of 2026-11-20.
  • Upgrade to 11.4.13, 11.3.22 or 10.6.22, then block /core/install.php even after upgrading. Drupal recommends keeping the installer blocked permanently.

Am I affected?

All of these must hold:

  • The site runs an affected Drupal core version.
  • /core/install.php is reachable from the network. Core's default .htaccess rules do not block it.
  • The configured database cannot be verified, or an installation is already in progress.
  • For the reinstall path, the web server can write to settings.php or change its permissions. Drupal says some exploit paths are blocked when it cannot.

The advisory rates the target distribution as uncommon, so not every Drupal site is exposed at any moment. The risk is concentrated in sites that leave the installer reachable and then hit a database outage or a failed configuration change. Those conditions are common enough in operations that the flaw is worth treating as an exposure question, not a theoretical one.

Branch Affected versions Fixed version
Drupal 11.4 11.4.0 to 11.4.12 11.4.13
Drupal 11.3 11.3.0 to 11.3.21 11.3.22
Drupal 11.0 to 11.2 11.0.0 to 11.2.x no fix; end of life, upgrade to 11.4.13
Drupal 10.6 10.6.0 to 10.6.21 10.6.22
Drupal 10.5 and earlier all releases no fix; end of life
Drupal 8 and 9 all releases no fix; end of life

Check the core version in each codebase:

grep -n "const VERSION" core/lib/Drupal.php
composer show drupal/core | grep -E '^versions'
drush status --field=drupal-version

Then check whether the installer answers from the internet:

curl -sS -o /dev/null -w '%{http_code}\n' https://example.com/core/install.php
curl -sS https://example.com/core/install.php | grep -Ei 'Choose language|Select an installation profile|already installed'

A 403 or 404 is the desired result. Any other response means the installer answered the request. A page that offers a language, an installation profile, or an 'already installed' message all mean the path is reachable. Block it even on a patched site. Run the check against your own site only.

How do I fix it?

Upgrade to the fixed release for your branch: Drupal 11.4.13, 11.3.22 or 10.6.22. Sites on 11.2 and earlier, 10.5 and earlier, or Drupal 8 and 9 must move to a supported branch, because those branches receive no fix.

# Composer-based site using drupal/core-recommended
composer update drupal/core-recommended --with-all-dependencies

# Or, if the project requires drupal/core directly
composer update drupal/core --with-all-dependencies

drush updatedb -y
drush cache:rebuild
  1. Upgrade every environment, including staging and any disaster-recovery copy.
  2. Run database updates and rebuild caches.
  3. Confirm the version with the checks in "Am I affected?".
  4. Block /core/install.php after the upgrade.

Drupal recommends three ways to block the installer. Pick one and keep it:

  1. Deny the path in the web server configuration. For nginx, add location = /core/install.php { deny all; } to the server block.
  2. Add an .htaccess rule in the core/ directory that denies install.php with Require all denied.
  3. Remove core/install.php and keep it removed with a Composer script after each update.

The first option is the least likely to be overwritten by an update. The installer is not removed by the security release, so the exposure check stays relevant after patching. The third needs care, because a later Composer operation can restore the file if the script is not configured. Drupal Steward protects known attack vectors for sites that use it, but the advisory says those sites should still upgrade in case new vectors appear.

What is the root cause?

The installer is part of Drupal core, not an optional module, so every affected site carries the entry point at /core/install.php. It has two jobs at the start of a request: verify that the configured database is reachable and does not already contain a Drupal site, and decide whether an installation is already complete. The vulnerable code gets both wrong when the database check fails.

install_verify_database_ready() in core/includes/install.core.inc calls tableExists() on the last table in the system schema and treats any exception as "the database might not be set up yet". At Drupal 11.4.12 the function is:

function install_verify_database_ready(): void {
  $system_schema = system_schema();
  $table = array_key_last($system_schema);

  $existing_install = FALSE;
  if (Database::getConnectionInfo()) {
    try {
      $existing_install = Database::getConnection()->schema()->tableExists($table);
    }
    // Do not trigger an error if the database query fails, since the database
    // might not be set up yet.
    catch (\Exception) {
    }
  }
  if ($existing_install) {
    throw new AlreadyInstalledException(\Drupal::service('string_translation'));
  }
}

If the connection fails, the exception is swallowed, $existing_install stays FALSE, and the caller proceeds as if the site were new.

install_begin_request() calls this function only when database_verified is false. It then reads the completed task and, in the affected release, does not consult the install_time state that install_finished() writes when an installation completes. A site whose install_task state is missing can therefore reach the installation checks even though install_time shows it was installed.

The third flaw is concurrency. install_bootstrap_full() starts a session but does not bind the installation to the session that started it. A second visitor can join an installation that is already in progress and finish it with their own choices.

How is it exploited?

Drupal rates the attack complexity as high and the target distribution as uncommon, and it records an existing proof of concept. The public advisory does not publish the request sequence. The mechanism is:

  1. Wait for, or cause, the configured database connection to fail. A database outage, an exhausted connection pool or a bad credential change can make tableExists() throw.
  2. Request /core/install.php. The exception is swallowed, the installer sees no existing installation, and it starts the installation flow.
  3. On a site whose install_task state is missing, the missing install_time check removes one of the guards that should stop the flow.
  4. Walk the installer. Choose a database the attacker controls, or use one that the installer can create, and create an administrator account.
  5. Install a module or theme with the new administrator account, or use another admin feature that writes PHP, to run code on the server.
  6. In the concurrency path, a second visitor joins an installation another administrator has already started and finishes it before the first session does.

The attacker needs the database check to fail at the right moment, or an installation to be in progress. That is why Drupal calls the configuration uncommon. It is also why blocking the installer removes the exposure even when a database outage happens.

How does the attack flow?

A database error that the installer treats as "not installed" opens the installer, the attacker supplies a database and an administrator account, and the administrator role turns the reinstall into code execution.

flowchart LR A["Database check fails"] --> B["install_verify_database_ready swallows the exception"] B --> C["installer treats the site as new"] C --> D["attacker walks /core/install.php"] D --> E["attacker's database and admin account"] E --> F["admin installs a module or theme"] F --> G["PHP runs on the server"]

About 29 percent of the 528,430 Drupal sites reporting usage in the week of November 8, 2026 were on end-of-life branches
Figure 1: Drupal sites reporting usage by branch status. Source: Drupal.org usage data quoted by The Hacker News, checked November 20, 2026

What can an attacker do?

An attacker who completes the installer can take over the site. They control the database, the administrator account and the configuration. That gives them the content, the user data and the ability to install a module or theme that runs PHP, which is code execution as the web server user.

The full path needs the installer to be reachable and the database check to fail, or an installation to be in progress. The advisory says some paths are blocked when the web server cannot write to or change permissions on settings.php. A read-only settings.php raises the difficulty but is not a substitute for the upgrade.

Drupal rates confidentiality, integrity and availability impact as all high. The advisory does not say the attacker gains operating-system root. Code execution is with the web server user, and further privilege escalation depends on the host.

Why does the fix work?

The fix makes a failed database check a hard stop and adds the missing installation marker:

-  if (!$install_state['database_verified']) {
-    install_verify_database_ready();
+  if (!$install_state['settings_verified']) {
+    try {
+      install_verify_database_ready();
+    }
+    catch (AlreadyInstalledException $e) {
+      throw $e;
+    }
+    catch (InstallerException) {
+      $install_state['configured_database_failed'] = TRUE;
+    }
   }
...
-  if ($task === 'done') {
-    throw new AlreadyInstalledException($container->get('string_translation'));
-  }
+  if ($task === 'done' || (!empty($task) && \Drupal::state()->get('install_time'))) {
+    throw new AlreadyInstalledException($container->get('string_translation'));
+  }

install_verify_database_ready() now throws InstallerException when the connection fails, and the caller records configured_database_failed. The requirements page then shows a database error and the installer does not continue. The install_time check recognizes an installed site even when the install_task state is missing.

The patch also binds an interactive installation to the first browser session with a random token stored in state, so a second visitor cannot take over an installation in progress. It stops auto-fixing settings.php permissions during the requirements check.

The patch closes the three paths described in the advisory. It does not remove core/install.php, so the permanent mitigation still matters.

How do I check if I was compromised?

Drupal published no indicators of compromise with the advisory. These checks look for installer access and for the changes a reinstall leaves:

# Requests to the installer in the web server logs
grep -Ei '/core/install\.php' /var/log/nginx/access.log /var/log/apache2/access.log

# The install timestamp, which a reinstall resets
drush state:get install_time

# Recently created administrator accounts
drush sqlq "SELECT uid, name, created FROM users_field_data ORDER BY created DESC LIMIT 20;"

# settings.php modification time and database settings
stat -c '%y %n' sites/default/settings.php
grep -n "^\$databases" -A 12 sites/default/settings.php

A recent install_time on a site that was installed long ago is a strong lead. So is a settings.php whose database settings do not match your deployment records. Compare the enabled modules and themes with your baseline as well:

drush pm:list --status=enabled --type=module
drush pm:list --status=enabled --type=theme

A request to /core/install.php is not proof by itself, because monitoring and security scanners also request it. The combination of installer requests, a changed install_time and an unexpected administrator account is what matters.

Timeline

  • 2026-11-16: Drupal published an advance notice, PSA-2026-11-16, for the security release.
  • 2026-11-18: Drupal published SA-CORE-2026-017 and released 10.6.22, 11.3.22 and 11.4.13.
  • 2026-11-19: Public coverage described the flaw and Drupal's installer guidance.

FAQ

  • Does a normal installed site with a healthy database allow a reinstall? No. When the database is reachable and the key_value table exists, the pre-patch check throws AlreadyInstalledException. The flaw needs the check to fail or an installation to be in progress.
  • Is it exploited in the wild? Drupal reports no attacks. The advisory records a proof of concept and rates exploitation as complex, and the CVE is not in CISA KEV as of 2026-11-20.
  • Do I still need to block the installer after upgrading? Yes. Drupal recommends it, because the installer is not needed after installation and the patch does not remove the file.
  • Are Drupal 11.2 and earlier fixed? No. Those branches are end of life. The fix is in 11.3.22 and 11.4.13, so older sites must move to a supported branch.
  • Does Drupal Steward protect me? It protects known attack vectors for sites that subscribe. Drupal still recommends upgrading in case new vectors appear.
  • Why is the CVE record missing? The advisory carries CVE-2026-132165 and was published on 2026-11-18, but the public CVE record had not appeared when we checked on 2026-11-20. Use the advisory as the primary source until the record is published.

Find exposed Drupal installers with Ostorlab

Ostorlab's Web Agentic Deep Scan maps the reachable web surface of an application, including exposed administrative and installation paths, so you can inventory the Drupal sites that still answer on /core/install.php: https://www.ostorlab.co/product/web_agentic_deep_scan

References

  • Drupal advisory SA-CORE-2026-017: https://www.drupal.org/sa-core-2026-017 (checked November 20, 2026)
  • Drupal advance notice PSA-2026-11-16: https://www.drupal.org/psa-2026-11-16 (checked November 20, 2026)
  • Fix commit: https://github.com/drupal/drupal/commit/03c02bcaa6d9be42d4576b8dc43a01dbdeb60877 (checked November 20, 2026)
  • Drupal 11.4.13 release: https://github.com/drupal/drupal/releases/tag/11.4.13 (checked November 20, 2026)
  • Drupal 11.3.22 release: https://github.com/drupal/drupal/releases/tag/11.3.22 (checked November 20, 2026)
  • Drupal 10.6.22 release: https://github.com/drupal/drupal/releases/tag/10.6.22 (checked November 20, 2026)
  • install.core.inc at 11.4.12: https://github.com/drupal/drupal/blob/11.4.12/core/includes/install.core.inc (checked November 20, 2026)
  • install.core.inc at 11.4.13: https://github.com/drupal/drupal/blob/11.4.13/core/includes/install.core.inc (checked November 20, 2026)
  • Securing the Drupal installer: https://www.drupal.org/docs/administering-a-drupal-site/security-in-drupal/securing-the-installer-installphp (checked November 20, 2026)
  • The Hacker News coverage and Drupal usage figures: https://thehackernews.com/2026/11/drupal-patches-critical-installer-flaw.html (checked November 20, 2026)
  • CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 20, 2026)