• Advisory ID: DRUPAL-SA-CONTRIB-2010-085
  • Project: Pathauto (third-party module)
  • Version: 5.x, 6.x
  • Date: 2010-August-11
  • Security risk: Less critical
  • Exploitable from: Remote
  • Vulnerability: Cross Site Scripting

Description

The Pathauto module automatically generates path aliases for various kinds of content (nodes, categories, users) without requiring the user to manually specify the path alias. It also provides additional tokens that can be used in URL alias patterns and anywhere else that the Token API is used.

The module does not sanitize the text in the [bookpathalias], [catalias], and [termalias] tokens. Under rare circumstances those tokens could cause a Cross Site Scripting (XSS) vulnerability that may lead to a malicious user gaining full administrative access.

This vulnerability is mitigated by the fact that a malicious user must have "create url aliases" permission and then one of those tokens must be used to display output on an HTML page (for instance, displaying a message to the user using an action from the token_actions.module). The normal circumstance of using these tokens as part of a Pathauto URL alias pattern is not vulnerable.

Versions affected

  • Pathauto module for Drupal 5.x versions prior to 5.x-2.4
  • Pathauto module for Drupal 6.x versions prior to 6.x-1.4

Drupal core is not affected. If you do not use the contributed Pathauto module, there is nothing you need to do.

Solution

Install the latest version:

See also the Pathauto project page.

Safe use of tokens

The existing [bookpathalias], [termalias], and [catalias] tokens are now sanitized. New [bookpathalias-raw], [termalias-raw], and [catalias-raw] companion tokens have been added for the un-sanitized versions of each token respectfully.

This is also a reminder to modules that use the Token API to display output on an HTML page (such as displaying a message to the user), that no tokens with the -raw suffix should be used.

Reported by

  • Dave Reid of the Drupal security team and module co-maintainer

Fixed by

  • Dave Reid of the Drupal security team and module co-maintainer

Contact

The Drupal security team can be reached at security at drupal.org or via the form at http://drupal.org/contact.