critical

CVE

CVE-2026-132165, CVE-2026-132166

CWE

CWE-284, CWE-754, CWE-502

Affected Surface

  • Drupal core (`drupal/core`) before 10.6.22, 11.0.0 through 11.3.21 and 11.4.0 through 11.4.12
  • Drupal 12.0 and 11.5 beta releases, which the 16 November PSA lists as affected
  • End-of-life Drupal 11.2.x and older, 10.5.x and older, and Drupal 8 and 9, which get no fix and need the installer blocked
  • Sites where `/core/install.php` is reachable over HTTP, which is the default: core's `.htaccess` does not block it

Update, 24 November 2026 (exploited in the wild, now in CISA KEV): Drupal has updated SA-CORE-2026-017: “the Security Team has received a report this was exploited on live sites as early as 2026-11-19 19:00 UTC.” The risk score moved from 18/25 (E:Proof) to 20/25 (AC:Complex/A:None/CI:All/II:All/E:Exploit/TD:Uncommon). CISA added CVE-2026-132165 to the Known Exploited Vulnerabilities catalog on 24 November with a due date of 27 November and forensic triage required. Drupal hasn’t published indicators or a victim count.

A public lab, abraxas/drupal-install-takeover, appeared on GitHub on 20 November. Its README describes one precondition: a finished site whose stored install_task state is something other than done while install_time is set. On 11.4.12, an anonymous POST /core/install.php then reaches the configure-site form and replaces user 1’s name, email and password; 11.4.13 answers “Drupal already installed”. We haven’t run it. You can check your own sites for that state with Drush:

drush state:get install_task
drush state:get install_time

Anything other than done for install_task on a live site means the installer can resume. Update, block /core/install.php, and if you were exposed, check whether user 1’s name, email or password changed after 19 November, review watchdog for installer activity, and look for new PHP files and modules.

TL;DR

Drupal core ships core/install.php, and it stays on the site after installation. Core’s default .htaccess doesn’t block it. On 18 November 2026 the Drupal Security Team disclosed CVE-2026-132165 (SA-CORE-2026-017): “under specific conditions” an anonymous visitor can use that installer to try to reinstall a live site, which “can lead to a site takeover or remote code execution.” Drupal rates it Critical (18/25) and records that a proof-of-concept exploit exists (E:Proof), with complex exploitation and uncommon target configurations. Anthropic’s OSS Scanner found it (ANT-2026-GMRPK0BU). Drupal had warned two days earlier that “exploits might be developed within hours or days.”

The same releases fix CVE-2026-132166 (SA-CORE-2026-018, Moderately critical). It’s a gadget chain in core’s cache collector classes that turns any separate unserialize() bug on a Drupal site into code execution. On its own it’s harmless.

The fixed versions are 11.4.13, 11.3.22 and 10.6.22. On 19 November there were no reports of exploitation, no KEV listing and no public PoC repository. That changed within days; see the update above.

What to do now:

  1. composer update drupal/core-recommended --with-dependencies (or drupal/core) to 11.4.13, 11.3.22 or 10.6.22, then drush updatedb and drush cache:rebuild.
  2. Block /core/install.php at the web server, whether or not you’ve upgraded. Drupal recommends this for every site, and it’s the only protection for end-of-life versions.
  3. Make sure the web server user can’t write settings.php or change its permissions. Drupal says that blocks some exploit paths.
  4. Check access logs for requests to install.php since your site went live.

Affected packages and projects

EcosystemPackageAffected versionsFixed or safe version
Packagistdrupal/core (CVE-2026-132165, CVE-2026-132166)below 10.6.2210.6.22 (published 18 November 14:44 UTC)
Packagistdrupal/core11.0.0 to 11.3.2111.3.22
Packagistdrupal/core11.4.0 to 11.4.1211.4.13
Packagistdrupal/core 12.0 and 11.5 betasaffected per PSA-2026-11-16new betas to follow, per Drupal
Drupal11.2.x and older, 10.5.x and older, Drupal 8 and 9affectedno fix. Block the installer

drupal/core-recommended and drupal/core-composer-scaffold move in lockstep with drupal/core. A lockfile pinned to an older core-recommended will keep you on the vulnerable core.

Drupal 10 and 11.3 lose security coverage in December under Drupal’s support schedule. The Hacker News, citing drupal.org usage data, reports that 154,485 of 528,430 reporting sites (about 29 percent) were on end-of-life branches in the week of 8 November. Those sites get no patch, so for them the installer block is the fix.

Technical analysis

The advisory doesn’t describe the attack, but the fix commit does show what changed. Each supported branch got one commit per advisory. For 11.4.x they’re 1c977e1e8e (SA-CORE-2026-017) and a5e5359f25 (SA-CORE-2026-018), committed 18 November 14:44 UTC. The 10.6.x commits are b5c1f46dda and 060794ac72, and the 11.3.x commits are 341aef9e26 and 7b2435ae73. All of the SA-CORE-2026-017 changes are in core/includes/install.core.inc.

1. A failing database check used to mean “not installed”

Before running, the installer calls install_verify_database_ready() to check whether the configured database already contains Drupal’s tables. In 11.4.12 that check swallowed every exception:

// core/includes/install.core.inc, Drupal 11.4.12
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(...);
  }
}

If the query against the configured database failed for any reason, $existing_install stayed FALSE and the installer carried on as if the site had never been installed. The fix turns that failure into an error and adds a second check that doesn’t depend on the schema query at all:

-  if (!$install_state['database_verified']) {
+  if (!$install_state['settings_verified']) {
     // Do not install over an existing installation. The call to
     // install_verify_database_ready() will throw an AlreadyInstalledException
     // if this is the case.
-    install_verify_database_ready();
+    try {
+      install_verify_database_ready();
+    }
+    catch (AlreadyInstalledException $e) {
+      throw $e;
+    }
+    catch (InstallerException) {
+      $install_state['configured_database_failed'] = TRUE;
+    }
   }
-  // Verify the last completed task in the database, if there is one.
   $task = install_verify_completed_task();
+  // The install_time state value is set when the installation finishes.
+  if ($task === 'done' || (!empty($task) && \Drupal::state()->get('install_time'))) {
+    throw new AlreadyInstalledException($container->get('string_translation'));
+  }
...
     catch (\Exception) {
+      throw new InstallerException('The configured database could not be verified.', 'Requirements problem');
     }

Line by line:

  • The guard changes from database_verified to settings_verified. The “already installed?” check now runs whenever settings.php isn’t fully verified, rather than being skipped once a database connection looks valid.
  • An exception from tableExists() now raises InstallerException. The caller records it as configured_database_failed, and install_check_requirements() turns that into a blocking “The configured database could not be verified” error.
  • If the install task log says done, or any task exists and the install_time state value is set (written by install_finished()), the installer refuses outright.

2. Only the browser that started an install can finish it

The fix adds a per-install token to install_bootstrap_full(). The first interactive session to reach full bootstrap stores a random token in its session and a hash in Drupal state. Any other session gets “Access denied”:

+  if ($install_state['interactive']) {
+    $hash = \Drupal::state()->get('install_session_token');
+    if ($hash === NULL) {
+      $token = Crypt::randomBytesBase64();
+      $session->set('install_session_token', $token);
+      \Drupal::state()->set('install_session_token', Crypt::hashBase64($token));
+    }
+    elseif (!hash_equals($hash, Crypt::hashBase64((string) $session->get('install_session_token')))) {
+      throw new InstallerException('The installation can only be continued in the browser session that started it.', 'Access denied');
+    }
+  }

install_finished() deletes the token. Before this, an installer run that had already passed the database step could be continued by whoever sent the next request.

3. The installer no longer chmods settings.php

drupal_verify_install_file() takes an $auto_fix argument that defaults to TRUE. When a check fails it calls drupal_install_fix_file(), which tries to change the file’s permissions until the check passes. The installer’s requirement checks for settings.php relied on that default. The fix passes auto_fix: FALSE at all three call sites:

-        $readable = drupal_verify_install_file($file, FILE_READABLE);
-        $writable = drupal_verify_install_file($file, FILE_WRITABLE);
+        $readable = drupal_verify_install_file($file, FILE_READABLE, auto_fix: FALSE);
+        $writable = drupal_verify_install_file($file, FILE_WRITABLE, auto_fix: FALSE);

That lines up with the advisory’s note that “some exploit paths are mitigated if the web server cannot write to or change permissions on settings.php.” The installer writes database credentials and the hash salt into settings.php. An installer that rewrites settings.php on a live site lets the person running it choose the database and create the first administrator account, which is how a reinstall turns into the takeover the advisory describes.

What we can’t tell from the patch is exactly which “specific conditions” make the database check fail on a real site. Drupal hasn’t published them, and the reporter’s PoC isn’t public. Treat any site with a reachable installer and a web-writable settings.php as the high-risk group.

SA-CORE-2026-018: a gadget chain in the cache collector

a5e5359f25 closes a property-oriented programming chain. YamlCacheCollectorDiscovery::__destruct() calls destruct() on its $yamlCacheCollector. When that property holds a CacheCollector, destruct() runs CacheCollector::updateCache(). That method calls methods on $this->cache and $this->lock. In a deserialized object, an attacker sets those properties to any class they like. The fix blocks the entry point and type-checks both properties:

--- a/core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php
+++ b/core/lib/Drupal/Core/Discovery/YamlCacheCollectorDiscovery.php
+  public function __unserialize(array $data): void {
+    throw new \BadMethodCallException('Cannot unserialize ' . get_class($this));
+  }
--- a/core/lib/Drupal/Core/Cache/CacheCollector.php
+++ b/core/lib/Drupal/Core/Cache/CacheCollector.php
+    if (!($this->cache instanceof CacheBackendInterface)) {
+      throw new \RuntimeException(sprintf(
+        'Unexpected type for %s::$cache (%s).',
...
+    if (!($this->lock instanceof LockBackendInterface)) {

Drupal rates it 14/25 because it needs a separate bug that passes attacker input to unserialize(). That’s exactly what the PHP release a day later fixed: CVE-2026-115560 and CVE-2026-126714 both let an attacker plant serialized objects in a PHP session file. Each needs a usable gadget chain in the app to reach code execution. Patch Drupal core and PHP together. See our write-up of the 19 November PHP release for the session bugs.

IOCs

These are vulnerabilities, not a malware campaign, so there are no domains, IPs or hashes. Signs of attempted or successful exploitation:

  • Requests to /core/install.php or /install.php (including /core/install.php/<anything>) after the site’s install date, especially POSTs.
  • sites/*/settings.php with a recent modification time, looser permissions than you set, or $databases credentials you don’t recognize.
  • An empty or unfamiliar site, an administrator account you didn’t create, or an install_time state value later than your real install date.

Detection and remediation

# 1. Installed core version
composer show drupal/core drupal/core-recommended 2>/dev/null | grep -E '^(name|versions)'
drush status --field=drupal-version
grep -A3 '"name": "drupal/core"' composer.lock | grep '"version"'

# 2. Is the installer reachable? All three should return 403 or 404
curl -sI https://example.com/core/install.php | head -1
curl -sIL https://example.com/install.php | grep -E '^HTTP'
curl -sI https://example.com/core/install.php/foo | head -1

# 3. Can the web server write or chmod settings.php? (run as the web server user)
ls -l web/sites/*/settings.php
sudo -u www-data test -w web/sites/default/settings.php && echo "WRITABLE by www-data"
stat -c '%U %a %y %n' web/sites/*/settings.php

# 4. Hunt access logs for installer hits
sudo zgrep -hE '"(GET|POST) /(core/)?install\.php' /var/log/nginx/access.log* /var/log/apache2/access.log* 2>/dev/null | tail -50

# 5. Install state (should show the original install timestamp)
drush state:get install_time
drush sql:query "SELECT uid, name, created FROM users_field_data ORDER BY created DESC LIMIT 5"

Block the installer at the web server. These rules are from Drupal’s installer guide:

# nginx: inside the server block. Use ^~ so /core/install.php/foo is also blocked
location ^~ /core/install.php {
  return 404;
}
# Apache vhost (not .htaccess)
<Location "/core/install.php">
  Require all denied
</Location>

If you can only edit .htaccess, use <Files "install.php"> Require all denied </Files>. You can also delete core/install.php and use a Composer script to delete it again after each composer install. Don’t block update.php by accident. Drush’s site:install doesn’t use install.php, so blocking it won’t affect Drush-based provisioning.

Drupal Steward customers are covered against known attack vectors. Drupal still says to upgrade, since new vectors may turn up.

If you find signs that the installer ran against a live site, restore settings.php and the database from a known-good backup. Then rotate the database password, the hash_salt, any API keys held in settings.php or config, and every administrator password. Check modules/, themes/ and sites/*/files for PHP files you didn’t deploy.

Timeline

  • 2026-10-08: Anthropic launches its OSS Scanner, which later reports this bug as ANT-2026-GMRPK0BU (per The Hacker News).
  • 2026-11-02: Drupal’s Security Team says AI-driven report volume is more than it can sustain and shortens core minor-version security coverage from 12 to 8 months starting in 2027.
  • 2026-11-16: PSA-2026-11-16 announces critical core releases for 18 November, 17:00 to 21:00 UTC, and warns that at least one issue is exploitable by anonymous users.
  • 2026-11-18: Fix commits and Drupal 11.4.13, 11.3.22 and 10.6.22 land (14:44 UTC tags and Packagist releases). SA-CORE-2026-017 and SA-CORE-2026-018 are published, and the Drupal advisory database adds DRUPAL-CORE-2026-017. Drupal updates its installer-hardening guide.
  • 2026-11-19: The Hacker News and BleepingComputer report the release. No exploitation, KEV listing or public PoC repository reported.
  • 2026-11-19 19:00 UTC: Earliest exploitation on live sites, according to the updated SA-CORE-2026-017.
  • 2026-11-20 13:56 UTC: The abraxas/drupal-install-takeover lab repository is created on GitHub.
  • 2026-11-24: Drupal updates the advisory to report exploitation and raises the risk score to 20/25. CISA adds CVE-2026-132165 to KEV, due 27 November.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References