- Advisory ID: DRUPAL-SA-2007-026
- Project: Drupal core
- Version: 4.7.x, 5.x
- Date: 2007-October-17
- Security risk: Moderately critical
- Exploitable from: Remote
- Vulnerability: Cross site scripting
The allowed extension list of the core Upload module contains the extension HTML by default. Such files can be used to execute arbitrary script code in the context of the affected site when a user views the file.
Revoking upload permissions or removing the .html extension from the allowed extension list will stop uploads of malicious files. but will do nothing to protect your site against files that are already present. Carefully inspect the file system path for any HTML files. We recommend you remove any HTML file you did not update yourself. You should look for
Wikipedia has more information about cross site scripting (XSS).
Important note: Configuration change needed
Installing the upgrade or using the patch will not remove the .html extensions from an already configured upload module. Visit Administer » Site Configuration » File uploads (admin/settings/uploads) on Drupal 5.x or administer » settings » upload (admin/settings/upload) on Drupal 4.7.x to remove html from the allowed extensions lists.
The steps above will stop uploads of malicious files, but will do nothing to protect your site against files that have already been uploaded. Make sure to carefully inspect the file system path for any HTML files.
- Drupal 4.7.x before version 4.7.8.
- Drupal 5.x before version 5.3.
Install the latest version:
- If you are running Drupal 4.7.x then upgrade to Drupal 4.7.8.
- If you are running Drupal 5.x then upgrade to Drupal 5.3.
If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade.
The Drupal security team.
The security contact for Drupal can be reached at security at drupal.org or via the form at http://drupal.org/contact.