Needs work
Project:
Switchtheme
Version:
7.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jun 2025 at 10:24 UTC
Updated:
6 Jun 2025 at 10:24 UTC
Jump to comment: Most recent
There were a lot of viruses on my two sites with this module, and some of the exploits had access to the file system. Over time, we realized that files get to the server through a theme switch request. I analyzed the module code using Deep Seek and formulated this message.
The SwitchTheme module for Drupal 7 contains critical security vulnerabilities:
$_GET['theme'] parameterThese vulnerabilities allow:
XSS Proof of Concept:
http://example.com/?theme=<script>alert(document.cookie)</script>CSRF Proof of Concept:
<img src="http://example.com/?theme=garland">check_plain() or filter_xss() for all theme parameter outputlist_themes()drupal_get_token() validationhook_permission() + user_access())switchtheme_switch() function if it exists
function switchtheme_safe_switch($theme_name) {
// Validate theme exists
// Check permissions
// Verify CSRF token
}No database schema changes required. Session handling modifications needed for:
Comments