Drupal Security: Essential Modules and Settings in 2026

Last updated on 20 Nov 2026
Drupal security: a website protected by security modules like a fortress
On Wednesdays, the Drupal security team publishes its advisories. When one is rated critical, bots start probing vulnerable sites within hours: that is what happened with the flaws nicknamed “Drupalgeddon” in 2014 and 2018. A well-configured, up-to-date Drupal site holds up very well. A site forgotten for two years, much less so.

This guide covers Drupal security in 2026: the Drupal security modules to install first on Drupal 10 and 11, the core settings to check, how to handle updates and Drupal vulnerabilities, and what managed Drupal hosting and maintenance should cover. An interactive checklist helps you assess your site.

At a glance

  • Drupal is one of the most secure CMSs, thanks to a dedicated security team that publishes advisories every week.
  • The first Drupal security measure is still applying core and module updates quickly after each advisory.
  • Five modules make a solid base: Password Policy, Security Kit, Security Review, Username Enumeration Prevention and two-factor authentication (TFA).
  • Drupal 7 has been unsupported since January 2025 and Drupal 10 is unsupported after December 9, 2026: move to Drupal 11.
  • Tested backups, monitoring and a response plan complete the protection.

Is Drupal a secure CMS?

Yes. Drupal is used by governments, universities and large companies, and it has a dedicated security team that reviews reports, coordinates fixes and publishes security advisories on a regular schedule. Its permission system is fine-grained, and its APIs protect by default against the most common SQL injection and XSS flaws.

But a site’s security depends mostly on how it is run: the version in use, how fast updates are applied, the contributed modules installed, server configuration, administrator passwords. The modules below shore up the most common weak spots.

Drupal security modules at a glance

Module Protects against Priority
Password Policy weak or reused passwords essential
Security Kit script injection, clickjacking, CSRF essential
Security Review configuration mistakes essential
Username Enumeration Prevention account discovery before brute force recommended
TFA (two-factor) stolen administrator passwords essential
Honeypot / Antibot bots on forms recommended
Automatic Updates delays in core security fixes useful
Drupal security modules to install on Drupal 10 and 11.

1) Password Policy

Password Policy enforces password rules: minimum length, character types, no reuse of old passwords, expiry after a set period. Apply strict rules to roles with admin access; for regular members, favor length over complexity, which is easier to remember and stronger.

2) Security Kit

Security Kit adds HTTP security headers without touching the server: Content-Security-Policy against injected scripts, clickjacking protection (X-Frame-Options), Strict-Transport-Security to force HTTPS, and origin checks against CSRF attacks. Start the CSP in “report only” mode to see what it would block before enforcing it.

3) Security Review

Security Review automatically checks for common configuration mistakes: file permissions, text formats that allow dangerous HTML, overly powerful roles, error display, file extensions allowed for upload. Run it after installation and after every major change; it is an excellent first-level audit.

4) Username Enumeration Prevention

By default, some Drupal forms and pages let someone guess whether a username exists. This module removes those clues, making brute-force attacks harder: the attacker no longer knows which accounts to target. Pair it with the core login flood control to block repeated attempts.

5) Generate Password and two-factor authentication

Generate Password creates random passwords automatically when an administrator creates accounts; check its compatibility with your version before installing it. More important today: two-factor authentication, with the TFA module, for every account with administrative rights. Even if a password leaks, access stays blocked without the second factor.

Want to know how your Drupal site would hold up against a real attack? Have your Drupal site tested by our experts

Bonus: other useful Drupal security modules

  • Honeypot or Antibot: block bots that fill in forms, without bothering visitors.
  • Automated Logout: logs out idle sessions, useful on shared computers.
  • Key: stores API keys and secrets outside the database and exported configuration.
  • Automatic Updates: applies core security updates, built into Drupal CMS.

Every added module is also code to maintain: install only what meets a need, and prefer modules covered by the drupal.org security policy (“Security coverage” badge).

Core settings to check

  • settings.php read-only and trusted_host_patterns set, to block Host header attacks.
  • Private files directory outside the web root for sensitive documents.
  • Text formats: full HTML reserved for trusted administrators.
  • Error display turned off in production.
  • Permissions reviewed role by role, main administrator account (uid 1) protected and rarely used.
  • HTTPS everywhere and secure session cookies.

Updates and Drupal vulnerabilities

The most effective rule is also the simplest: apply security fixes as soon as they are released. Subscribe to drupal.org security advisories (mailing list or feed), enable the Update Manager module to get alerts, and manage code with Composer so an update takes minutes. For a critical core flaw, a realistic target is updating within 24 hours.

On versions: Drupal 7 has been unsupported since January 5, 2025, Drupal 10 reaches end of life on December 9, 2026, and Drupal 11 is the version to use. A site on an unsupported version receives no more fixes: every new flaw stays open.

Drupal vulnerability: quickly applying core and module security fixes

Checklist: is your Drupal site well protected?

Tick what is in place on your Drupal site (nothing is saved)

What to do after a breach or hack

1

Isolateput the site in maintenance mode or take it offline if data is exposed.
2

Preserve evidencecopy server logs, database and files before fixing anything.
3

Fixapply the patch, change every password and API key.
4

Clean upfind added files and accounts, restore a clean backup if needed.
5

Notifyinform affected people and the data protection authority if personal data leaked.
6

Hardenanalyze the root cause and complete the checklist to prevent a repeat.
Incident response steps for a Drupal site.

Managed Drupal maintenance: delegating security

For many businesses, the hard part is not knowing what to do but doing it every week. Managed Drupal maintenance hands a provider the job of tracking security advisories, applying updates on staging then production, running backups with tested restores, monitoring uptime and responding to incidents. Check the contract for response times on critical fixes, backup frequency and scope (core, modules, server). Custom PHP code matters too: see our PHP security guide.

Managed Drupal maintenance: monitoring, backups and security incident response

Common mistakes

  • Waiting for the “next maintenance window” to apply a critical fix.
  • Staying on Drupal 7 or 10 for lack of a migration budget.
  • Installing modules without security coverage, or abandoned ones.
  • Sharing the administrator account among several people or providers.
  • Never testing backup restores.
  • Allowing full HTML to every editor.

Wrapping up

Drupal security rests on a solid foundation, as long as you maintain it. Our advice: move to Drupal 11, apply fixes as soon as they are released, install the five core modules with two-factor authentication, run Security Review regularly, and test your backups. For the rest of the setup before launch, see our Drupal SEO checklist.

Frequently asked questions about Drupal security

Is Drupal a secure CMS?

Yes, Drupal is known for its security: a dedicated team publishes advisories and fixes regularly, and its APIs protect by default against the most common flaws. A site’s real security, however, depends on its version, how quickly updates are applied, the modules installed and the server configuration.

Which Drupal security modules should you install first?

A good base includes Password Policy, Security Kit, Security Review, Username Enumeration Prevention and TFA for administrator two-factor authentication. Honeypot or Antibot protect forms against bots. Choose modules covered by the drupal.org security team and actively maintained.

What if my site still runs on Drupal 7?

Drupal 7 has received no official fixes since January 5, 2025: every new flaw stays open. Plan a migration to Drupal 11, or to another CMS if the project allows. In the meantime, commercial extended support and a web application firewall reduce the risk without removing it.

How do you update Drupal safely?

Take a full backup, apply the update with Composer on staging, run database updates, test key pages and features, then repeat in production. For a critical security fix, shorten this cycle to a few hours.

How do you protect a Drupal site against brute-force attacks?

Enforce long passwords with Password Policy, hide usernames with Username Enumeration Prevention, keep core login flood control and enable two-factor authentication. A web application firewall or security CDN also blocks much of the malicious traffic upstream.

How do you get alerted to Drupal security flaws?

Subscribe to drupal.org security advisories by email or feed, and enable the Update Manager module, which flags available updates in the admin. With a managed maintenance contract, your provider follows these advisories and applies fixes within agreed timeframes.

Our sources