Almost everything beyond Drupal core arrives as third-party code: contributed modules, themes, libraries pulled in by Composer, and scripts embedded through blocks or theme libraries. Each one runs with the same access to your database and files as the rest of the site. This guide covers how to judge an add-on before it goes in, and how to keep an eye on it afterwards.
What counts as an add-on on Drupal
On Drupal, an add-on can be one of several things, and each carries a different kind of risk:
- Contributed modules hosted on drupal.org, which add features, field types, integrations and admin tools.
- Contributed themes, which can include their own templates and JavaScript.
- PHP and JavaScript libraries that a module depends on, installed by Composer as dependencies.
- Custom modules written by an agency or freelancer, which have no public release history to check.
- Embedded scripts such as chat widgets, analytics tags and form embeds, pasted into a block, a text format or a theme library.
Only the first two get public maintenance information on drupal.org. For the rest you need to ask the supplier directly.
Read the project page before you run Composer
Every contributed project has a page on drupal.org with signals you can read in a few minutes. Start from the module listing at drupal.org/project/project_module and open the page of the module you are considering.
- Maintenance status. Projects declare whether they are actively maintained, minimally maintained, looking for a maintainer, or unsupported. A module that is looking for a new maintainer may still work, but nobody is committed to fixing it.
- Development status. This tells you whether the project is under active development, receiving maintenance fixes only, or no longer developed.
- Security advisory coverage. The Drupal Security Team publishes advisories at drupal.org/security, but only for projects that opt in and only for stable releases. A project page that shows the security advisory coverage badge has a stable release the team will issue advisories for. If a module has only development, alpha or beta releases, a vulnerability in it may be fixed without any public advisory.
- Core compatibility. Check that a release explicitly supports the Drupal major version you run. Drupal 7 reached end of life on 5 January 2025, so a module that only supports it is not a candidate for a supported site.
- Issue queue. Open it and read the recent entries. Look for how quickly maintainers reply, whether bug reports sit unanswered, and whether people report breakage after core updates.
- Release history. Frequent, small releases that keep pace with core are a healthier pattern than a single release followed by silence.
Judge the code and what it can do
Project pages tell you about the people. You also need to know what the module does once it is enabled.
Open the module’s .info.yml file and its composer.json to see what else it pulls in. A small feature that drags in several unrelated libraries enlarges your attack surface. Each dependency is another thing to keep updated.
Next, look at the permissions it defines in its .permissions.yml file. Drupal flags some permissions as restricted because they carry security implications, and the permissions page warns you about them. Do not hand a new permission to roles by habit. Grant it to the narrowest role that needs it, then review People > Permissions after enabling the module.
Also check what the module exposes. Does it add routes reachable by anonymous visitors? Does it accept file uploads, run custom queries, or let editors enter PHP, raw HTML or JavaScript? Those are the areas where input handling matters most. The OWASP Top Ten is a useful list of what to look for when you read unfamiliar code.
For embedded scripts, ask who serves the file. A script loaded from a third-party domain runs with full access to every page it appears on, including admin pages if it is added sitewide. Prefer scripts limited to the pages that need them, and give each one a named owner on your side.
Install it somewhere safe first
Do not try a new module on the live site. Use a local or staging copy built from your current code and configuration, and install through Composer so the change is recorded:
- Run composer require drupal/module_name on the development copy.
- Enable it with Drush or the Extend page.
- Test the feature, then test the pages around it, because a module can affect forms, caching and performance elsewhere.
- Export the configuration and review the diff so you know exactly which settings the module added.
- Deploy the Composer files and the exported configuration together, not by editing production by hand.
If the project uses patches, record each one in your Composer setup with a link to the issue it comes from. A patch with no public issue is a maintenance burden nobody else is sharing.
Monitor after installation
Vetting is not a one-time step. Set up a routine so you hear about problems quickly.
- Watch advisories. Subscribe to the security announcements at drupal.org/security and check each one against your installed modules. Your Drupal documentation reading list should include the guidance on security updates for your version.
- Check from the command line. composer outdated “drupal/*” lists modules with newer releases, and composer audit reports known advisories for installed packages. Drush can report available security updates with its pm:security command.
- Use the Update Status report. Drupal core includes the Update Manager module, which reports on available releases and flags security updates in the admin interface. Keep it enabled on at least one environment you look at regularly.
- Re-read project pages. Once or twice a year, revisit each module’s maintenance status. A project can move from actively maintained to unsupported without any change on your site.
- Review permissions after updates. A new release can introduce new permissions that default to nobody, or new routes you did not expect.
Remove what you no longer use
An unused module that stays installed still has to be updated, and any vulnerability in it still counts. Removal on Drupal has two stages, and skipping either leaves clutter behind:
- Remove content and configuration that depend on the module, such as fields, blocks and views, then uninstall it with drush pm:uninstall or the Uninstall page. Disabling alone is not an option in Drupal 8 and later; uninstalling is what removes its configuration and database tables.
- Export configuration, then run composer remove drupal/module_name so the code leaves the codebase and the lock file.
Do the same for embedded scripts: delete the block or theme library entry, then check that the third-party domain no longer appears in your page source.
Frequently asked questions
Is a module safe because it is on drupal.org?
No. Hosting on drupal.org means the project follows the community’s publishing rules, not that its code has been audited. Security advisory coverage is the stronger signal, since it means the Drupal Security Team handles reports for its stable releases.
Should I avoid modules with no security advisory coverage?
Not always, but treat them with more caution. Read the code, check how active the issue queue is, and decide whether you can maintain the module yourself if the author walks away.
How often should I review installed modules?
Check for updates on a fixed schedule, and always after a security announcement. Review the full list of installed modules at least once or twice a year, and remove anything the site no longer uses.