Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

ClamAV

10,775 sites Security covered Drupal 10–11
View on drupal.org

This module integrates with the ClamAV virus scanner to check uploaded files for viruses and prevent infected files from being saved. It does not provide the anti-virus scanning engine itself.

Drupal integration with the ClamAV virus scanner.

ClamAV module is DrupalSouth 2025 Splash award nominee in Open Source category.

This module will verify that files uploaded to a site are not infected with a virus, and prevent infected files from being saved.

NB: The module integrates with ClamAV, it does not provide an anti-virus scanner engine.

Drupal 11+

For Drupal 11, the ClamAV module is likely to become a plugin for the Antivirus module.

  • ClamAV (based on Antivirus) 4.0.x
  • ClamAV standalone 2.1.x
  • ClamAV legacy 2.0.x

Please try the Drupal 11 dev branches in non-production environments and share your feedback.

Installation

Comprehensive documentation can be found on the Installing ClamAV page. In general, the Drupal module doesn't have any specific requirements for how ClamAV is installed.

  1. First install the clamscan program:
    • Ubuntu:
      sudo apt-get install clamav clamav-daemon
    • Redhat / CentOS:
      1. Enable the EPEL repo
      2. yum install clamav
      3. yum install clamd
    • OS-X (via homebrew): brew install clamav
  2. Then enable and configure the ClamAV Drupal module
  3. Done!

Post-installation

Once the ClamAV module is installed and configured, it's good practice to verify that it's detecting viruses properly. You can do this safely by trying to add content to your site, attaching the Eicar test virus to the content. The file upload should be blocked, and you should find a message recording this in the Watchdog logs.

Configuration

The Drupal configuration page is at /admin/config/media/clamav.

"Daemon mode" is recommended. "Executable mode" is significantly slower, and in some configurations, the ClamAV service may need to run under the same group as the webserver process.

In performance-testing, the mean scan-time for each configuration was as follows:

  • Executable: 10.3 seconds
  • Daemon-mode (unix socket): 0.0009 seconds
  • Daemon-mode (TCP/IP): 0.0010 seconds

Daemon-mode came out 10,000 times faster than executable mode.

Documentation

The best resource is the ClamAV documentation.

For issues that are Drupal-specific or will affect most users of the Drupal ClamAV module, please raise and discuss them in the ClamAV module issue queue.

Related modules

  • ClamAV Queue provides asynchronous queued scanning of uploaded files (for a specific use-case).

Acknowledgements

More acknowledgements below.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
2.1.0 Stable 10–11 Jan 25, 2025
2.0.3 Stable 8–10 Jan 25, 2025
4.0.x-dev Dev 10–11 Jan 25, 2025
2.1.x-dev Dev 10–11 Jan 25, 2025
2.0.x-dev Dev 8–10 Nov 24, 2024
4.x-dev Dev 10–11 Oct 27, 2024