Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

xss_file_scan

63 sites Security covered
View on drupal.org

xss_file_scan is a Drupal contrib module that scans uploaded files for potentially malicious content using administrator-defined patterns. It integrates with Drupal’s validation and configuration systems to block, log, and report suspicious uploads before they are saved.

Features

Pattern-based file scanning using configurable regular expressions.
Validation constraint attached to file uploads (including media/file fields).
Flexible actions per detection: block upload, log event, show user-friendly error.
Optional email notifications to one or more recipients.
Per-language error messages for localized feedback.
Central configuration form under the admin “Configuration → System” section.

Post-Installation

Enable the xss_file_scan module via Extend (/admin/modules) or Drush.
Go to the settings page (Configuration → System → XSS file scan) and:
Define one or more detection patterns (regular expressions).
Choose whether to block uploads, log events, show error messages, and/or send email.
Configure notification recipients and per-language error messages.
Test by uploading a file containing a known test pattern to verify behavior (block/log/email).

Additional Requirements

A working mail system in Drupal (core mail or a mail backend module) to send email notifications.
Access to the Drupal log (Database Logging or syslog) to review logged scan results.
PHP PCRE support (regular expressions) for pattern matching, which is standard in typical PHP setups.

Database Logging (dblog) or a logging backend (e.g., syslog) for easier monitoring of detected events.
A mail backend module if you need advanced delivery options or external mail services.
Security-oriented modules (e.g., Security Review, file antivirus modules) to complement pattern-based scanning.

Supporting this Module

Report bugs, feature requests, and edge cases via the project’s issue queue.
Contribute patches or merge requests to improve scanning logic, UX, or performance.
Share real-world patterns and configuration examples that help other site builders.
Sponsor development or documentation if you rely on the module in critical environments.

Community Documentation

See the module’s README file and in-code documentation for configuration details and examples.
Follow best-practice guides for secure file uploads in Drupal and adapt your patterns accordingly.
When you develop custom integrations or recipes, consider sharing them as community documentation or issue queue notes so others can benefit.

Activity

Total releases
2
First release
Mar 2026
Latest release
1 month ago
Release cadence
1 day
Stability
100% stable

Releases

Version Type Release date
1.0.1 Stable Mar 3, 2026
1.0.0 Stable Mar 2, 2026