psf-drupal-installer-check(8)
Overview
Drupal core installer: site takeover through install.php (v1) CVE-2026-132165 (SA-CORE-2026-017, "Fail2Install") and CVE-2026-136716 (SA-CORE-2026-019)
Drupal core ships core/install.php, the installer, and it stays on the site after installation. Under conditions Drupal does not publish, an anonymous visitor can use it to reinstall a running site: a site takeover, or code execution.
SA-CORE-2026-017 (CVE-2026-132165), 18 November 2026: Highly critical, 20/25. Exploited on live
sites from 2026-11-19 19:00 UTC; on CISA's KEV list since 24 November (federal deadline
27 November). Fixed in 10.6.22, 11.3.22 and 11.4.13. Drupal: "some (but not all) exploit
paths are mitigated if the web server cannot write to or change permissions on settings.php."
SA-CORE-2026-019 (CVE-2026-136716), 25 November 2026: Highly critical, 21/25, exploited. Sites
"in unusual or incomplete install states" stayed open to takeover after SA-CORE-2026-017,
production sites included, and nothing in the interface shows it. Its affected range ends
before 10.6.23, 11.3.23 and 11.4.14 (the advisory's solution text still names 10.6.22,
11.3.22 and 11.4.13 while the releases were packaged; this script judges by the range).
Those releases came out on 25 November 2026. On CISA's KEV list since 27 November (federal
deadline 30 November), so both installer CVEs are listed.
After updating, run update.php (or drush updatedb): an update hook repairs sites in that state.
"If you have already secured the installer, you are not vulnerable."
Drupal 11.2 and below and 10.5 and below are end of life and get no fix. Drupal 8 and 9 too.
Drupal Steward protects its subscribers from the known attack vectors.Securing the installer protects against both, patched or not. Drupal's guidance offers three ways: deny it in the web server configuration, deny it in .htaccess, or remove the file and keep it removed. mitigate denies it in the web server (403), because that lasts: a core update or a composer install puts a removed core/install.php back, and overwrites a scaffolded .htaccess. --remove also takes the file away, moving it into a backup (SHA-256 checked) that rollback puts back; a file Drupal ships is never deleted.
Command reference
The original help text below includes the command syntax, options, environment variables and exit codes supplied with this tool. Review the source and test any change before applying it to a production system.
Original command-line help
Drupal core installer: site takeover through install.php (v1)
CVE-2026-132165 (SA-CORE-2026-017, "Fail2Install") and CVE-2026-136716 (SA-CORE-2026-019)
If this software is helpful, consider a donation to our 501c3 nonprofit:
https://privacysafe.foundation
Help and documentation: https://privacysafe.app/docs/security-patches/web-apps/drupal/
Drupal core ships core/install.php, the installer, and it stays on the site after installation.
Under conditions Drupal does not publish, an anonymous visitor can use it to reinstall a running
site: a site takeover, or code execution.
SA-CORE-2026-017 (CVE-2026-132165), 18 November 2026: Highly critical, 20/25. Exploited on live
sites from 2026-11-19 19:00 UTC; on CISA's KEV list since 24 November (federal deadline
27 November). Fixed in 10.6.22, 11.3.22 and 11.4.13. Drupal: "some (but not all) exploit
paths are mitigated if the web server cannot write to or change permissions on settings.php."
SA-CORE-2026-019 (CVE-2026-136716), 25 November 2026: Highly critical, 21/25, exploited. Sites
"in unusual or incomplete install states" stayed open to takeover after SA-CORE-2026-017,
production sites included, and nothing in the interface shows it. Its affected range ends
before 10.6.23, 11.3.23 and 11.4.14 (the advisory's solution text still names 10.6.22,
11.3.22 and 11.4.13 while the releases were packaged; this script judges by the range).
Those releases came out on 25 November 2026. On CISA's KEV list since 27 November (federal
deadline 30 November), so both installer CVEs are listed.
After updating, run update.php (or drush updatedb): an update hook repairs sites in that state.
"If you have already secured the installer, you are not vulnerable."
Drupal 11.2 and below and 10.5 and below are end of life and get no fix. Drupal 8 and 9 too.
Drupal Steward protects its subscribers from the known attack vectors.
Securing the installer protects against both, patched or not. Drupal's guidance offers three
ways: deny it in the web server configuration, deny it in .htaccess, or remove the file and keep
it removed. mitigate denies it in the web server (403), because that lasts: a core update or a
composer install puts a removed core/install.php back, and overwrites a scaffolded .htaccess.
--remove also takes the file away, moving it into a backup (SHA-256 checked) that rollback puts
back; a file Drupal ships is never deleted.
Usage:
./drupal-installer-check.sh [check] [--url URL ...]
check (default) Finds the Drupal sites (core/lib/Drupal.php) and reports, for each: the core
version against both advisories, whether core/install.php is there, any rule
that names install.php in its .htaccess or the nginx configuration, and who can
change settings.php. --url URL (repeatable) also asks the live site for
/core/install.php, /install.php and /core/install.php/x: the installer is
blocked only when all three answer 403 or 404. Exit 0 = nothing to do,
1 = a site is affected or its installer reachable, 2 = could not check.
Read-only.
hunt Access logs: requests for install.php (a POST that was answered 200 or 302 is
the strong lead); for each site: PHP files under sites/*/files, and settings.php
changed since 2026-11-18. Says how to check user 1, which Drupal asks you to do
(this script does not open the database). Exit 0 = nothing found, 1 = leads,
2 = nothing could be read. Read-only.
mitigate [--remove] [--installer-only] [--dry-run] (root)
Blocks the installer in the web server, which lasts across core updates:
Apache gets one configuration file for every site (conf-available, enabled,
or conf.d), nginx a snippet (location ^~ /core/install.php { return 403; })
and an include in each server block whose root is a Drupal site. Each file it
edits is backed up first; the change is tested (apachectl -t, nginx -t) and
taken back if the test fails, and only then is the server reloaded. --remove
also moves core/install.php into a backup (SHA-256 checked; a file Drupal ships
is never deleted); a core update or composer install brings it back. Unless
--installer-only, sets settings.php to 0444 and its folder to 0555, as Drupal
recommends. File operations in a site run as the account that owns its folder.
rollback [--dry-run] (root) takes the web server changes back (a file changed since is left
alone), puts back what --remove moved, and restores the modes. An installer
that has come back meanwhile is left in place, and its backup kept.
version print the script version.
Env: DRUPAL_ROOTS (folders to search, space separated; default /var/www /srv /home /opt
/usr/share/nginx), ACCESS_LOGS (log files for hunt, instead of the usual nginx, Apache and
LiteSpeed access logs), NGINX_CONF (default /etc/nginx), APACHE_CONF (default /etc/apache2,
else /etc/httpd), NGINX_BIN and APACHECTL (the programs that test and reload), STATE_DIR (default
/var/lib/psf-security-patches/drupal-installer), PSF_LOCK_WAIT (seconds a change waits for
another, default 30; the lock is STATE_DIR/.lock)The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.