Why Drupal Updates Are Not Done Until update.php Runs
Drupal update.php runs the database update hooks a security fix may depend on. Why a code deploy alone can leave a site vulnerable, and how to define done.
A Drupal update is not finished when the new code lands. It is finished when update.php has run and every pending database update hook has completed. The Fail2Install follow-up fix, SA-CORE-2026-019, is the clearest recent example: Drupal states that an update hook must run to repair affected production sites, so a team that deployed 11.4.14 and never ran update.php is still exposed. Any patch process that stops at the code deploy has a gap, and this is how to close it.
Why does update.php matter after a security update?
Drupal stores part of its behaviour in the database, including schema, configuration and state. A security fix that depends on changing stored data ships as an update hook, and that hook only executes when update.php or an equivalent command runs. Until then the new code is present but the condition it was written to fix still exists.
Most core security releases change only PHP code, which is why many teams have never been burned by skipping the database step. The November 2026 installer fix is different. Beazley Security's analysis describes the mechanism: the installer records its progress in the site database and resumes from the last completed step, so a site whose installation never recorded itself as finished can be pulled back into the installer by an anonymous visitor. New code cannot fix a stale database value. The 2026-11-25 release therefore includes an update hook that repairs the stored install state, and Drupal's advisory says plainly to run update.php because that hook must execute to fix existing production sites. The full story is in the Fail2Install exploitation report.
What is an update hook?
An update hook is a function a Drupal module ships to migrate existing sites from one stored state to another when the code changes. Drupal tracks which hooks have run per module and executes only the pending ones, in order, when an administrator runs update.php or a command such as Drush's updatedb.
Hooks exist because code and data must agree. A release that adds a column, renames a configuration key or corrects a stored flag ships the code that expects the new shape and the hook that produces it. Deploy one without the other and the site runs in a half-migrated condition that may work, may throw errors, or, as in this case, may stay vulnerable while reporting the patched version number.
Why do teams skip the database step?
Three habits cause it. First, automated deployment pipelines that pull the new release and clear caches but were never wired to run database updates, often because the person who built the pipeline only ever saw code-only releases. Second, teams that treat update.php as a manual, risky step for major upgrades and do not associate it with routine security releases. Third, hosting platforms that deploy code on push and leave database updates to a separate button or command nobody owns.
The result is a version-check blind spot. Monitoring tools, security scanners and the Drupal status report all read the code version. None of them will tell you that a hook is pending unless you look at the status report's database update warning or run the update command in check mode. Drupal's second advisory adds a harder problem for Fail2Install specifically: the vulnerable install state is not visible in the user interface at all, so even a careful administrator reading the dashboard would see nothing wrong.
How should a patch process define "done"?
Done means the fixed code is deployed, pending database updates have run and been confirmed, caches are rebuilt, and the condition the advisory describes has been verified closed. For SA-CORE-2026-019 that means version 10.6.23, 11.3.23 or 11.4.14, update.php run with no pending updates, and a refused request to /core/install.php from outside the network.
Write that definition into your patch runbook so it is checked rather than remembered. A practical structure:
- Deploy code to the environment.
- Run database updates and capture the output. An empty "no pending updates" result is a valid outcome and should be logged, because it proves the step ran.
- Rebuild caches.
- Verify the advisory condition directly. For an installer flaw, that is an external request to the installer path. For a permissions flaw, it is a request as a low-privilege user. Match the test to the advisory.
- Record the version, the update output and the verification result against the ticket.
Step 4 is where how to check a Drupal site for compromise after Fail2Install fits for this specific advisory, because Drupal warns that sites left exposed after the first fix may already be compromised, and a successful patch does not undo a takeover that already happened.
What about staging, multisite and many-site fleets?
Database updates have to run per site. A Drupal multisite installation shares code across many databases, so a single code deploy followed by one update.php run on the default site leaves every other site's hooks pending. Fleet tooling needs to iterate over sites, and the log should show one update result per site, not per deploy.
Staging deserves the same rule. Running update.php on staging first catches hooks that fail against real data before they fail in production, and a hook that errors halfway leaves the site in exactly the half-migrated condition you are trying to avoid. Take a database backup immediately before running updates in production so a failed hook has a clean rollback.
Why this matters beyond Drupal
The same split between code and stored state exists in most applications that persist configuration: WordPress has a database upgrade routine, Magento has setup:upgrade, Django and Rails have migrations, and many commercial products have a "finish upgrade" step in the admin console. In each case the vendor's version number reports the code, and the security property may live in the data. When an advisory says to run a migration, upgrade script or update hook, that step is part of the patch, and a change ticket that closes without it is recording work that was not completed.
The practical rule: before you mark a security advisory closed, read the vendor's solution text to the end. If it names any step after "install the latest version", that step is in scope. Drupal's advisory names two, run update.php and secure the installer, and sites that did only the first are the ones the second advisory was written about.