Open source software security

Drupal Custom Pagers XSS Vulnerability

Description of Vulnerability:

Drupal (http://drupal.org) is a robust content management system (CMS) written in PHP and MySQL. The Drupal Custom Pagers module (http://drupal.org/project/custom_pagers) "allows administrators to define context-sensitive previous/next pagers for any node type." The Custom Pagers module contains an arbitrary HTML injection vulnerability (also known as cross site scripting, or XSS) due to the fact that it fails to sanitize Custom Pagers names before display in the administrative back end interface.

Systems affected:

Drupal 5.21 with Custom Pagers 5.x-1.9, and Drupal 6.19 with Custom Pagers 6.x-1.0-beta2 were tested and shown to be vulnerable

Impact

User could inject arbitrary scripts into pages affecting site users. This could result in administrative account compromise leading to web server process compromise. A more likely scenario would be for an attacker to inject hidden content (such as iframes, applets, or embedded objects) that would attack client browsers in an attempt to compromise site users' machines. This vulnerability could also be used to launch cross site request forgery (XSRF) attacks against the site that could have other unexpected consequences.

Mitigating factors:

In order to exploit this vulnerability the attacker must have credentials to an authorized account that has been assigned the 'administer custom pagers' permission. This could be accomplished via social engineering, brute force password guessing, or abuse or legitimate credentials.

Proof of concept:

Install Drupal, and the Custom Pager module

Navigate to the Custom pagers administration page at ?q=admin/build/custom_pagers

Click the 'Add a new custom pager' link or go to ?q=admin/build/custom_pagers/add

For the 'Title' of the new page enter "<script>alert('xss');</script>"

Enter arbitrary values for the rest of the form and click the 'Submit' button

Vendor Response:

Drupal security team no longer supports vulnerabilities in Drupal 5 and explicitly does not support resolution of vulnerabilities in modules designated alpha, beta, dev, or other testing release. Module maintainer notified in public forums.