Drupal Content Access Module 6.x-1.1 XSS
Description of Vulnerability:
Drupal (http://drupal.org) is a robust content management system (CMS) written in PHP and MySQL that provides extensibility through hundreds of third party modules. The Content Access Module (http://drupal.org/project/content_access) suffers from a cross site scripting vulnerability because it does not sanitize role names before displaying them on the 'Access Control' screen of managed content types. This vulnerability is exacerbated by the fact that Drupal 6.12 core does not perform input validation on role names as they are being created. This can lead to a situation where users administering role based access controls of content types could be exposed to malicious HTML content.
Drupal 6.12 with Content Access 6.x-1.1 was tested and shown to be vulnerable
Authenticated users could be exposed to XSS attacks when administering content access. Users with this responsibility are generally site administrators. Cross site scripting attacks against administrators could lead to full web server process compromise.
In order to carry out the exploit described below the attacker must be able to inject malicious content into role names, which is possible for authenticated users with the 'administer permissions' permission. Other attack vectors may exist that do not require these restricted permissions.
Proof of concept:
- Install Drupal 6.12 and Content Access 6.x-1.1
- Click Administer -> User management -> Roles
- Enter "<script>alert('xss');</script>" in the "Name" textarea
- Click the "Add Role" button
- Click on Administer -> Content Types
- Click on 'edit' next to any content type
- Click on 'Access control' link
Drupal security was notified of this vulnerability on 5/19/2009. Vendor has declined to issue an official security announcement due to the restricted access rights required to carry out the proof of concept exploit. Vendor has filed a bug with the module maintainer at http://drupal.org/node/472494.