Critical Drupal Fail2Install RCE Flaw Under Active Exploitation

Overview of the Fail2Install Exploit
What is Fail2Install?
The Fail2Install module was introduced to Drupal 9 and 10 as a lightweight, automated hardening tool that runs during the installation process. Its primary purpose is to detect and block common brute‑force login attempts by creating temporary firewall rules and adjusting PHP settings. Because it operates early in the bootstrap sequence, the module has privileged access to core configuration files and the underlying operating system, making it an attractive target for attackers seeking a foothold before the site is fully hardened.
Timeline of Discovery
On November 23, 2026, an independent security researcher posted a proof‑of‑concept exploit on a public forum, claiming remote code execution (RCE) against any site running Fail2Install version 1.4.2 or earlier. Within 48 hours, multiple security‑focused mailing lists, including Full Disclosure and Bugtraq, began circulating the details. By November 25, the Drupal security team issued Security Advisory SA‑2024‑012, confirming the vulnerability and warning that active exploitation was already observed in the wild.
Technical Details of the Vulnerability
Root Cause Analysis
The flaw resides in the way Fail2Install parses user‑supplied configuration files during the post‑install hook. The module uses the PHP parse_ini_file function without proper sanitization, allowing an attacker to inject arbitrary PHP code via specially crafted INI entries. Because the parsed data is later passed to eval() for dynamic rule generation, any malicious payload is executed with the same privileges as the web server process.
Exploit Mechanics
Exploitation follows a three‑step chain:
File Upload or Write Access: The attacker gains the ability to write a malicious
.inifile into thesites/default/filesdirectory, either through an unsecured file upload form or a misconfiguredphp://tempstream.Configuration Injection: The crafted INI file contains a key such as
post_install_hook = "eval(base64_decode('...'))". When Fail2Install processes this file, theeval()call executes the decoded payload.Command Execution: The payload typically spawns a reverse shell, creates a new admin user, or installs a web‑shell backdoor, granting the attacker persistent control over the compromised Drupal instance.
Because the vulnerable code runs before Drupal’s own security hardening mechanisms are applied, traditional defenses like mod_security rules or Drupal’s built‑in input sanitization are bypassed.
Impact on Drupal Sites
Successful exploitation grants the attacker full remote code execution on the underlying server. In practice, this means:
Complete takeover of the Drupal site, including creation of privileged user accounts.
Potential lateral movement within the hosting environment, especially on shared‑hosting platforms.
Data exfiltration of sensitive content, user credentials, and configuration files.
Installation of cryptocurrency miners or ransomware, leveraging the server’s compute resources.
Given the prevalence of Drupal in government, education, and enterprise portals, the real‑world risk is substantial.
Active Exploitation Landscape
Observed Attack Patterns
Security telemetry from several Managed Detection and Response (MDR) providers shows a spike in inbound traffic targeting the /install.php endpoint combined with unusual POST bodies containing base64‑encoded strings. In most cases, the malicious payloads attempt to write the INI file to sites/default/files/fail2install.ini. The attacks are often orchestrated from botnets located in Eastern Europe and Southeast Asia, using rotating IP addresses to evade simple IP‑based blocking.
Indicators of Compromise
Administrators should monitor for the following IOCs:
Unexpected creation of
fail2install.inior similarly named files in thesites/default/filesdirectory.
New PHP files containing base64‑decoded strings or the signature
eval(base64_decode).
Outbound connections from the web server to unknown IP addresses on ports 4444, 5555, or 22 (indicative of reverse shells).
Log entries showing
POST /install.phpwith unusually large payloads (over 100 KB).
When any of these signs appear, immediate containment actions are required.
Mitigation and Remediation Steps
Immediate Actions for Administrators
Time is of the essence. Follow this checklist without delay:
Isolate the Server: Block inbound traffic at the network perimeter and place the host in a quarantine VLAN.
Disable the Fail2Install Module: Edit
sites/default/settings.phpto set$config['system.module']['fail2install'] = FALSE;or remove the module directory entirely.Remove Malicious Files: Delete any
*.inifiles insites/default/filesand any newly created PHP web‑shells.Rotate Credentials: Reset all Drupal admin passwords, database passwords, and any SSH keys that may have been compromised.
Apply the Official Patch: Upgrade to Fail2Install 1.4.3 or later, which replaces the unsafe
eval()call with a safer configuration parser.Scan for Persistence: Use an integrity‑checking tool (e.g.,
TripwireorDrupal’s core checksum) to verify that no other files have been altered.
Long‑Term Hardening Strategies
Beyond the immediate fix, organizations should adopt a defense‑in‑depth posture:
File‑Upload Restrictions: Enforce strict MIME‑type validation and store uploads outside the web root.
Least‑Privilege Execution: Run PHP-FPM pools under dedicated, non‑root users with limited filesystem access.
Web‑Application Firewalls: Deploy rules that detect and block base64‑encoded
eval()patterns.
Regular Security Audits: Schedule quarterly code reviews of custom modules and third‑party extensions.
Continuous Monitoring: Integrate Drupal logs with a SIEM solution to surface anomalous install‑script activity.
Vendor Response and Patch Timeline
Drupal Security Advisory
The Drupal security team released SA‑2024‑012 on November 25, 2026. The advisory classifies the vulnerability as Critical (CVSS 9.8) and provides a detailed remediation guide. It also includes a list of affected versions and a migration path to the patched release.
Patch Deployment Guidance
For sites using Composer, the recommended upgrade command is:
composer require drupal/fail2install:^1.4.3 --update-with-dependencies
Administrators on legacy installations should download the patched tarball from the official Drupal website, replace the module directory, and run drush cr to clear caches. After updating, verify the module version via the drush pm:list command.
Lessons Learned and Future Outlook
Supply‑Chain Security in Open‑Source CMS
The Fail2Install incident underscores the importance of scrutinizing third‑party modules that execute code during installation or upgrade phases. Unlike runtime plugins, install‑hooks run with elevated privileges before the CMS can enforce its own security policies. This creates a narrow window where a malicious payload can bypass many defenses.
Recommendations for the Community
To mitigate similar risks, the Drupal community should consider the following actions:
Implement automated static analysis of install‑hook code in contributed modules.
Encourage maintainers to adopt the
safe_parse_ini_filepattern that avoidseval()entirely.
Provide clearer guidance on the safe handling of user‑generated configuration files.
Establish a bounty program focused on supply‑chain vulnerabilities within the Drupal ecosystem.
By fostering a culture of proactive security review, the community can reduce the attack surface of one of the world’s most widely deployed content management systems.
Conclusion
The emergence of a critical RCE flaw in the Fail2Install module, coupled with evidence of active exploitation, represents a stark reminder that even well‑intentioned security utilities can become vectors for compromise. Organizations running Drupal must act swiftly to patch, isolate, and harden their environments. Simultaneously, developers and the broader open‑source community should prioritize secure coding practices for install‑time logic, ensuring that the very tools designed to protect sites do not become their Achilles’ heel.
