>samit_hota
Back to advisories

Security Advisory · SH-2026-255

MEDIUMCVE-2026-132165OPEN

Drupal Core RCE Flaw (CVE-2026-132165) Allows Unauthenticated Site Takeover

Affected: Drupal Core

Samit Hota·
#kev#drupal

A serious Drupal Core Remote Code Execution Vulnerability (CVE-2026-132165) allows unauthenticated attackers to compromise existing websites by hijacking the CMS setup process. Under specific edge conditions, Drupal Core fails to fail securely, exposing install.php to external reinstallation requests. If an attacker reaches the installation script while the application is in a vulnerable state, they can reconfigure site settings, overwrite administrative access, and execute arbitrary code on the underlying web server.

Mechanism of the Installer Takeover

The core flaw stems from how Drupal evaluates whether a site is already installed and fully configured. When install.php (or core/install.php) is invoked, the application checks settings.php and tests database connectivity. If transient infrastructure issues occur—such as database connection timeouts, corrupted environment variables, or misconfigured reverse proxies that cause database parameters to evaluate as empty—the application can misinterpret the environment as a fresh, unconfigured installation rather than throwing a fatal error.

Because the application does not fail securely when these conditions are met, the installer interface opens to public input. An attacker probing install.php can submit a database host under their control or reset administrative credentials, registering themselves as the site administrator (UID 1). Once administrative access is established, executing arbitrary PHP code on the server is straightforward via module uploads or configuration changes.

Exploitation Path & Exposure

Installer hijacking logic is a prime target for automated scanning networks and opportunistic threat actors. Because the vulnerability requires no prior authentication or user interaction, attackers continuously scan large IP ranges for accessible install.php endpoints. They send repeated automated HTTP requests, waiting for edge cases where backend database maintenance or site deployment race conditions temporarily trip the site into an uninitialized state.

Any organization running public-facing Drupal instances is at risk, particularly high-traffic web properties where database connection pools can drop under heavy load or during database cluster failovers. If a database outage coincides with an automated probe, takeover can occur in seconds without any manual intervention by the attacker.

Remediation and Hardening

Organizations operating Drupal must update Drupal Core to the latest patched version immediately. In addition to applying vendor updates, security teams should implement defense-in-depth measures to neutralize installer exposure entirely:

  • Block Access to install.php: Restrict web access to core/install.php at the web server layer (Nginx, Apache, or your WAF/CDN). Unless an administrator is actively performing a site installation or major schema update, install.php should never be accessible from the public internet.
  • Lock File Permissions: Ensure sites/default/settings.php is strictly set to read-only permissions (chmod 444 or 400) and owned by a dedicated deployment account rather than the web server execution user (e.g., www-data). This prevents the application process from modifying configuration settings even if an installation path is mistakenly exposed.
  • Configure Hard Failure on Database Disconnects: Ensure web server and PHP runtime configurations return HTTP 500 or 503 status codes immediately upon database unreachable states, rather than passing requests down to application logic that might default to installer fallbacks.

Under CISA Binding Operational Directive (BOD) 26-04 guidelines, security teams should prioritize restricting internet exposure of installer endpoints immediately while scheduling emergency core updates before November 27, 2026.

Found something similar in your stack?

Let's find out before it becomes an incident.

Book an advisory call