Drupal SWFTools Module XSS Vulnerability
Description of Vulnerability:
Drupal (http://drupal.org) is a robust content management system (CMS) written in PHP and MySQL. The Drupal SWF Tools module (http://drupal.org/project/swftools) contains multiple cross site scripting (XSS) vulnerabilities due to the fact that it fails to sanitize user supplied input before display.
Drupal 6.19 with SWF Tools 6.x-2.5 was tested and shown to be vulnerable
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.
In order to exploit this vulnerability the attacker must have credentials to an authorized account that has been assigned the 'administer flash' permission. This could be accomplished via social engineering, brute force password guessing, or abuse or legitimate credentials.
Proof of Concept:
- Install Drupal and enable the SWFTools module
- Navigate to the 'Embed settings' page at ?q=admin/settings/swftools/embed
- Enter "<script>alert('xss');</script>" at the end of the 'HTML alternative:' text
- Save the form
- Same as above
- Enable swfobject2 embedding method and select as default from ?q=admin/settings/swftools/embed
- Enter '7");alert('xss');swfobject.embedSWF("' for 'Flash version:' at ?q=admin/settings/swftools/embed
- Click 'Save configuration'
SWFTools allows users to embed Flash elements that could exploit XSS on their own so this vulnerability will be fixed in public.