- Advisory ID: DRUPAL-SA-2008-026
- Project: Drupal core
- Version: 6.x
- Date: 2008-April-09
- Security risk: Moderately critical
- Exploitable from: Remote
- Vulnerability: Access bypass
The menu system routes page requests to appropriate handlers. It also determines whether a user has access to pages based on several criteria, such as permissions assigned to a role. Drupal 6 features an entirely revised menu system, including changes to the way access is dealt with, which if not properly understood by developers can lead to vulnerabilities. This security release provides a more secure access behaviour by default, and fixes incorrectly set menu items in Drupal core.
Access to some pages was not appropriately controlled:
- Any user can edit profile pages of other users.
- Users who can view administration pages are able to edit content types.
- The tracker and blog pages expose information to users without the "access content" permission.
- Drupal 6.x before version 6.2.
Install the latest version:
- If you are running Drupal 6.x then upgrade to Drupal 6.2.
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 patch fixes incorrectly set menu items in Drupal core, but does not contain the menu API change which would provide secure defaults. This patch is a temporary solution to be used if modules are required which are still incompatible with the new API changes.
- To patch Drupal 6.1 use SA-2008-026-6.1c.patch.
It is essential to follow this process when updating:
- First make sure that you are logged in as user number 1 or that your site's settings.php has $update_free_access = TRUE; so that anyone can access the update.php script while you update the site. We suggest you log in as user 1 because you might have difficulties in gaining write access to your settings file.
- Turn your site into offline mode.
- Then, and only then replace your Drupal source code files with the new ones from Drupal 6.2.
- Run update.php.
- Turn your site back to online mode.
- If you edited your site's settings.php, make sure to set $update_free_access = FALSE;
If you do not follow the above procedure, and just replace the source files, any attempt to access the site will be greeted with the message: "Fatal error: Call to undefined function user_uid_optional_to_arg() in includes/menu.inc on line 594" and you will have no way to set the site to offline mode on the web interface until you get through update.php.
Contributed modules may require an update to work properly with Drupal 6.2. Failing to update modules will lead to some pages of the affected modules not being accessible.
Note for Module developers
Drupal 6.2 contains two API changes.
- Menu access callbacks are no longer inherited from parent items.
- %user_current has been renamed to %user_uid_optional.
Additional information can be found in Updating your 6.x module to work with 6.2.
- The tracker and profile access issue were respectively reported by Peter Wolanin and Greg Knaddison of 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.