-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vulnerability Report Original Date of Vendor Notification: April 19, 2011 15:15 (GMT - 4:00) Description of Vulnerability: - ----------------------------- Drupal (http://drupal.org) is a robust content management system (CMS) written in PHP and MySQL. The Webform module (http://drupal.org/project/webform) "adds a webform node type to your Drupal site." The Drupal webform module is the 13th most popular third party contributed module in the Drupal project, installed on more than 116,000 sites. The module contains multiple cross site scripting (XSS) vulnerabilities due to the fact that it fails to sanitize user supplied input before display. The module also fails to restrict file uploads to the Drupal installation directory. Systems affected: - ----------------- Drupal 6.20 with Webform 6.x-2.10, Drupal 7.0 with Webform 7.x-3.9 and Drupal 5.23 with Webform 5.x-2.10 were all tested and shown to be vulnerable. Impact - ------ In specific scenarios unauthenticated users could inject arbitrary scripts into pages affecting site administrative users. This could result in administrative account compromise leading to web server process compromise. Another 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. Attackers could also use file uploads in webforms to write arbitrary files to the filesystem as the web server. Mitigating factors: - ------------------- In order to exploit the form name upload XSS vulnerability users must be able to submit webforms with file components, including unauthenticated users. In order to exploit form configuration vulnerabilities (using component names) the attacker must have credentials to an authorized account that has been assigned the permissions to create and/or edit a webform. This could be accomplished via social engineering, brute force password guessing, or abuse or legitimate credentials. File uploads are restricted by type based on extension and can only be written in locations to which the file server has permissions. Proof of Concept: - ----------------- 1. Install Drupal and Webform module 2. Create a new webform at ?q=node/add/webform, using arbitrary values 3. Edit the form components at ?q=node/X/edit/components where 'X' is the node id 4. Type an aritrary name for a new form component and select 'file' as the type then click 'Add' 5. In the resulting screen enter "../../../../../../../../../../../../tmp" in the 'Upload Directory' 6. Click submit 7. View the form at ?q=node/X 8. Select a file using the 'Browse' button then submit the form 9. Viewing the filesystem the uploaded file can be found in the /tmp directory 1. Install Drupal and Webform module 2. Create a new webform at ?q=node/add/webform, using arbitrary values 3. Edit the form components at ?q=node/X/edit/components where 'X' is the node id 4. Type an aritrary name for a new form component and select 'file' as the type then click 'Add' 5. Enter arbitrary values for the file component definitions 6. View the form at ?q=node/X 8. Select a file named "