Drupal Panels 6.x-3.3 Module XSS
On Wednesday, May 20, 2010, Drupal security coordinated the announcement of security fixes to the Chaos Tools Suite (http://drupal.org/node/803944) and the Panels (http://drupal.org/node/803952) modules. The Panels module updates went hand in hand and fixed a number of issue. One of these was a cross site scripting (XSS) vulnerability that manifested in Panels module version 6.x-3.3 with Ctools 6.x-1.3 discovered by Martin Barbella.
Systems affected:
Drupal 6.16 with Panels 6.x-3.3, and Ctools 6.x-1.3 was tested and shown to be vulnerable.
Mitigating factors
Users with create content or administer panels privileges could use the proof of concept below to attack other site users, including site administrators.
Impact
Stored cross site scripting could be used to compromise administrative accounts leading to a full server compromise.
Proof of concept
- Install and enable Panels and CTools
- Create a node with the title "<script>alert(1)</script>" from ?q=node/add, note the node id
- Create a "panel node" ?q=from node/add/panel/choose-layout
- Choose the 'Single column' layout (?q=node/add/panel/onecol), any layout will work though
- Enter "<script>alert(2)</script>" for the 'Title' and arbitrary values for the rest
- Click 'Save' to save the panel
- Go to the panel content page for this node at ?q=node/XX/panel_content where XX is the node id
- Click the gear icon under 'Display settings' and select 'Add Content'
- In the lightbox pop up click 'New custom content'
- Enter "%node:title" in the 'Body' field, arbitrary values for 'Title' and 'Administrative title'
- Click the 'Finish' button
- Click the gear icon as in step 8 and click 'Existing node'
- Enter the nid from step #2 above in the 'Enter the title or NID fo a node:' text area
- Click 'Finish'
- Observe the JavaScript alert
- Click 'Save' to save the panel
- Observe the JavaScript alert, further views of the 'Panel content' will reveal this alert
- Click the 'View' tab to view the Panel at ?q=node/XX where XX is the nid of the panel
- Observe the second JavaScript.
Solution
Upgrade to the latest versions of Ctools and Panels.