What Is Drupal install.php and Why Is It Still Reachable?
Drupal install.php is the setup script that stays at /core/install.php after a site is built. What it can do, why it stays reachable, how to lock it down.
Drupal install.php is the web-based setup script that creates a new Drupal site: it writes settings.php, builds the database schema and creates the first administrator account. It ships in every copy of Drupal core at /core/install.php and stays on disk after installation. Core's default .htaccess rules do not block requests to it, so unless the site owner adds a rule, the installer remains reachable from the internet for the life of the site. The Fail2Install flaw turned that leftover script into a site takeover path, which is why Drupal now tells every site to lock it down.
What is Drupal install.php?
Drupal install.php is the script that runs the installation wizard for a new Drupal site. It handles language selection, profile choice, database connection, settings file creation and the first administrator account, then records that installation is complete.
The installer lives at /core/install.php in Drupal 8 and later. Older URLs such as /install.php redirect there. The script is part of core, so every site has it, including sites that were installed from the command line with Drush or Composer scripts and never used the web wizard. It is ordinary PHP, served by the same web server that serves your pages, and it runs with the same filesystem and database access as the rest of Drupal.
What does the installer have permission to do?
By design, the installer can do almost everything a site owner can do at the start of a site's life. It can:
- Write or rewrite settings.php, including database credentials
- Create and change file permissions in the settings directory
- Create database tables and run install hooks for core and profile modules
- Create the user 1 account, Drupal's built-in superuser, and set its email and password
Those are exactly the capabilities an attacker wants. Replacing the user 1 account alone grants full administrative control of the site. Rewriting settings.php can repoint the site at a database the attacker controls or change which code paths load. That is why Drupal's advisory for CVE-2026-132165 describes the impact as site takeover or remote code execution, and why the Fail2Install exploitation story became an emergency rather than a routine update.
Why is install.php still reachable after installation?
The installer stays reachable because Drupal relies on a software check, not file removal, to decide whether installation should proceed. When a request hits /core/install.php on an installed site, Drupal is supposed to detect that the site already exists and refuse. Nothing removes or blocks the file by default, so the protection is only as good as that check.
Beazley Security's analysis of the November 2026 advisories explains the mechanism behind the flaw. The installer records its progress in the site database and resumes from the last completed step. A site whose installation never recorded itself as finished looks, to the installer, like a site still being set up. Drupal's follow-up advisory SA-CORE-2026-019 confirms that certain sites in "unusual or incomplete install states" remained vulnerable even after the first patch, that the condition is not visible in the user interface, and that production sites were among them.
CISA filed the weakness under CWE-636, not failing securely. The pattern is general: a safety check meets a condition its author did not anticipate and allows the dangerous action instead of refusing. The Drupal CVE record uses CWE-306, missing authentication for a critical function, which describes the same outcome from the other side: a function that can rebuild the site accepts requests from anyone.
How do you secure the Drupal installer?
Drupal's guidance offers three options: deny access to the installer in the web server configuration, add a rule to the .htaccess file in the web root, or remove the file and keep it removed with Composer scripts so updates do not restore it. After applying one, request /core/install.php from outside your network and confirm the server refuses it.
A few notes on each option, drawn from the project's advisory and the follow-up reporting:
- A web server rule is the most durable choice on nginx or Apache because core updates never touch your server configuration. Beazley Security recommends confirming the block with a request from outside the server, for example
curl -I https://<your-site>/core/install.php, and checking that the request is refused. - An .htaccess rule only works where Apache honours per-directory overrides. Drupal ships a default .htaccess, and a core update can replace it, so keep your addition somewhere you will reapply it.
- Removing the file works but Composer-based deployments will put it back on the next core update unless a post-install or post-update script deletes it again. Drupal's guidance specifically mentions Composer scripts for this reason.
Drupal's second advisory states plainly that a site which has already secured the installer is not vulnerable to CVE-2026-136716. That makes installer lockdown the single most effective control for this class of bug, independent of which core version you run.
What about settings.php permissions?
Drupal's advisory says some, but not all, exploit paths are mitigated when the web server account cannot write to or change permissions on settings.php. The installer needs write access to that file during a genuine installation, which is the only time it should ever be writable.
Check that settings.php and the sites/default directory are owned by a deployment account rather than the web server user, and that the web server has read access only. This is standard Drupal hardening advice that predates the 2026 flaws, and it limits what a hijacked installer can change. Do not treat it as a substitute for the patch or for blocking the installer; Drupal is explicit that it closes only part of the problem.
Other setup scripts that follow the same pattern
Drupal is not alone in shipping a setup script that lingers. Many PHP applications include install, upgrade or setup pages that are expected to be deleted or disabled after first run. Drupal's own update.php is another privileged entry point, which is why Drupal gates it behind a setting or an administrator session. The lesson from Fail2Install applies to all of them: inventory the privileged scripts your web root exposes, decide which ones a production site needs, and block the rest at the web server where application bugs cannot reach.
If you need to confirm whether anyone reached your installer before you blocked it, how to check a Drupal site for compromise after Fail2Install walks through the logs and database fields to review.