Pre-auth remote code execution in Drupal 8.9-11 via file-descriptor, DB-connection, and TCP port limits
Exhausting RLIMIT_NOFILE, database max_connections, or TCP source-port limits can be leveraged to achieve pre-authentication remote code execution on stock Drupal 8.9-11 installations.
Security & privacy Assetnote / Searchlight 24 Nov 2026 Disclosure Prototype evidence
Published as “Fail2Install: Turning System Limits into Pre-Auth RCE in Drupal”
Why it matters
An unauthenticated attacker can gain remote code execution on many widely deployed Drupal sites by exhausting common system limits.
Summary
The researchers examined how availability-related system limits (file descriptors, database connections, TCP TIME_WAIT ports) can be turned into security primitives. By exhausting these limits during Drupal's installer flow they force a FAIL, FAIL, SUCCESS sequence that re-opens the installer, injects a PHP payload via an SQLite database file, and executes it through a .htaccess bypass, achieving pre-auth RCE on Drupal 8.9-11 across Apache/MySQL, Apache/PostgreSQL, PHP-FPM/MySQL, and PHP-FPM/PostgreSQL. Their evidence consists of controlled lab exploits on AWS EC2 instances, with benchmarks showing the technique works on servers with at least 4 vCPUs.
What they found 2
- Pre-auth RCE affecting Drupal 8.9-11 across four deployment combos
“Applying this methodology to Drupal uncovered a pre-authentication RCE affecting Drupal 8.9, 9, 10, and 11 across four common deployment combinations: Apache with PostgreSQL, Apache with MySQL, PHP-FPM with PostgreSQL, and PHP-FPM with MySQL.”
- SQLite installer can create a .php file that is executed via .htaccess bypass
“By selecting a path ending in .php under the document root, the installer creates an SQLite database with a PHP extension:”
Caveats 7
- Exploitation requires a server with at least 4 vCPUs; on 2 vCPU instances it may depend heavily on deployment configuration.
- Default PHP-FPM configuration (pm.max_children = 5) makes reaching the database connection limit impractical without additional tricks.
- Linux tcp_max_tw_buckets limits the total TIME_WAIT sockets; on a t3.small instance the limit of 8,192 prevented source-port exhaustion.
- Based on our benchmark results, we believe this vulnerability can be exploited remotely on servers with 4 vCPUs. On servers with only 2 vCPUs, however, exploitation is likely to depend more heavily on the deployment configuration.
- With the default PHP-FPM configuration (pm.max_children = 5), reaching the connection limit is significantly less practical.
- Linux's tcp_max_tw_buckets setting limits the total number of TIME_WAIT sockets that can exist in a network namespace. On the tested t3.small, tcp_max_tw_buckets was set to 8,192. Once this limit is reached, Linux immediately destroys additional TIME_WAIT sockets.
- The issue affects Drupal 8.9, 9, 10, and 11, but not Drupal 7 or Drupal 8 before 8.9.
What’s new here 4
- Shows how availability limits can be repurposed as code-execution primitives.
- Demonstrates a pre-auth RCE chain that works across four common Drupal deployment stacks.
- Introduces SQLite path injection during installation to execute arbitrary PHP.
- Provides empirical benchmarks for exhausting DB connections and TCP source ports on cloud VMs.