===================================================================== CERT-Renater Note d'Information No. 2007/VULN402 _____________________________________________________________________ DATE : 23/10/2007 HARDWARE PLATFORM(S) : / OPERATING SYSTEM(S) : Systems running DRUPAL. ====================================================================== http://drupal.org/node/184313 http://drupal.org/node/184315 http://drupal.org/node/184316 http://drupal.org/node/184320 http://drupal.org/node/184336 http://drupal.org/node/184323 http://drupal.org/node/184348 http://drupal.org/node/184354 ______________________________________________________________________ SA-2007-023 - PUBLIC SERVICE ANNOUNCEMENT: PHP EXPLOIT USING DRUPAL cIRCULATING * Advisory ID: SA-2007-023 * Project: PHP * Version: PHP 4 < 4.4.3, PHP 5 < 5.1.4 * Date: 2007-October-17 * Security risk: Critical * Exploitable from: Remote * Vulnerability: unset() hash / index collision exploit using Drupal ------------DESCRIPTION------------ The PHP unset() Hash / Index collision vulnerability [http://www.hardened-php.net/hphp/zend_hash_del_key_or_index_vulnerability.html] causes the unset() [ http://www.php.net/unset ] statement to fail in certain circumstances. Drupal uses the unset statement to eliminate all non-whitelisted global variables when the option "register_globals [http://www.php.net/register_globals ]" is enabled for your PHP installation. As unset() can be caused to fail on vulnerable versions of PHP, arbitrary global variables can be created. This can easily lead to the execution of arbitrary PHP code with a specially crafted URL, similar to the one shown below, that causes the menu system to call the PHP evaluator with arbitrary code: http://example.com?_menu[callbacks][1][callback]=drupal_eval&_menu[items][][type]=-1&-813992032=1&q=1/%3C?phpinfo(); An exploit for this is widely circulating. The attack will not work when "register_globals" is set to off. The issue is not limited to installations with "register_globals" set to on. unset() is used in other parts of the codebase where a bypass /may/ result in unintended actions that /may/ compromise your security. ------------VERSIONS AFFECTED------------ * PHP 4 before version 4.4.3. * PHP 5 before version 5.1.4. ------------SOLUTION------------ Upgrade to the latest version of PHP: * When using PHP 4 upgrade to PHP 4.4.7. * When using PHP 5 upgrade to PHP 5.2.4. Always apply the latest security patches to your server components. You may need to review your server management strategy if you are still running a vulnerable PHP version. ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ----SA-2007-024 - DRUPAL CORE - HTTP RESPONSE SPLITTING --- * Advisory ID: DRUPAL-SA-2007-024 * Project: Drupal core * Version: 4.7.x, 5.x * Date: 2007-October-17 * Security risk: Moderately critical * Exploitable from: Remote * Vulnerability: HTTP response splitting ------------DESCRIPTION------------ In some circumstances Drupal allows user-supplied data to become part of response headers. As this user-supplied data is not always properly escaped, this can be exploited by malicious users to execute HTTP response splitting attacks which may lead to a variety of issues, among them cache poisoning, cross-user defacement and injection of arbitrary code. ------------VERSIONS AFFECTED------------ * Drupal 4.7.x before version 4.7.8. * Drupal 5.x before version 5.3. ------------SOLUTION------------ Install the latest version: * If you are running Drupal 4.7.x then upgrade to Drupal 4.7.8 [http://ftp.drupal.org/files/projects/drupal-4.7.8.tar.gz ]. * If you are running Drupal 5.x then upgrade to Drupal 5.3 [http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz ]. If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade. * To patch Drupal 4.7.7 use SA-2007-024-4.7.7.patch [http://drupal.org/files/sa-2007-024/SA-2007-024-4.7.7.patch ]. * To patch Drupal 5.2 use SA-2007-024-5.2.patch [http://drupal.org/files/sa-2007-024/SA-2007-024-5.2.patch ]. ------------REPORTED BY------------ The Drupal security team. ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. -SA-2007-025 - DRUPAL CORE - ARBITRARY CODE EXECUTION VIA iNSTALLER.- * Advisory ID: DRUPAL-SA-2007-025 * Project: Drupal core * Version: 5.x * Date: 2007-October-17 * Security risk: Highly critical * Exploitable from: Remote * Vulnerability: Arbitrary code execution ------------DESCRIPTION------------ The Drupal installer allows any visitor to provide credentials for a database when the site's own database is not reachable. This allows attackers to run arbitrary code on the site's server. An immediate workaround is the removal of the file install.php in the Drupal root directory. ------------VERSIONS AFFECTED------------ * Drupal 5.x before Drupal 5.3 ------------SOLUTION------------ Install the latest version: * If you are running Drupal 5.x then upgrade to Drupal 5.3 [ http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz ]. If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade. * To patch Drupal 5.2 use SA-2007-025-5.2.patch [http://drupal.org/files/sa-2007-025/SA-2007-025-5.2.patch ]. ------------REPORTED BY------------ Mark Fallon Wolfgang Ziegler ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ------SA-2007-026 - DRUPAL CORE - CROSS SITE SCRIPTING VIA UPLOADS---- * Advisory ID: DRUPAL-SA-2007-026 * Project: Drupal core * Version: 4.7.x, 5.x * Date: 2007-October-17 * Security risk: Moderately critical * Exploitable from: Remote * Vulnerability: Cross site scripting ------------DESCRIPTION------------ The allowed extension list of the core Upload module contains the extension HTML by default. Such files can be used to execute arbitrary script code in the context of the affected site when a user views the file. Revoking upload permissions or removing the .html extension from the allowed extension list will stop uploads of malicious files. but will do nothing to protect your site against files that are already present. Carefully inspect the file system path for any HTML files. We recommend you remove any HTML file you did not update yourself. You should look for , CSS includes, Javascript includes, and onerror="" attributes if you need to review files individually. Wikipedia has more information about cross site scripting [http://en.wikipedia.org/wiki/Xss ] (XSS). ------------IMPORTANT NOTE: CONFIGURATION CHANGE NEEDED------------ Installing the upgrade or using the patch will not remove the .html extensions from an already configured upload module. Visit Administer » Site Configuration » File uploads (admin/settings/uploads) on Drupal 5.x or administer » settings » upload (admin/settings/upload) on Drupal 4.7.x to remove html from the allowed extensions lists. The steps above will stop uploads of malicious files, but will do nothing to protect your site against files that have already been uploaded. Make sure to carefully inspect the file system path for any HTML files. ------------VERSIONS AFFECTED------------ * Drupal 4.7.x before version 4.7.8. * Drupal 5.x before version 5.3. ------------SOLUTION------------ Install the latest version: * If you are running Drupal 4.7.x then upgrade to Drupal 4.7.8 [http://ftp.drupal.org/files/projects/drupal-4.7.8.tar.gz ]. * If you are running Drupal 5.x then upgrade to Drupal 5.3 [http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz ]. If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade. * To patch Drupal 4.7.7 use SA-2007-026-4.7.7.patch [http://drupal.org/files/sa-2007-026/SA-2007-026-4.7.7.patch ]. * To patch Drupal 5.2 use SA-2007-026-5.2.patch [http://drupal.org/files/sa-2007-026/SA-2007-026-5.2.patch ]. ------------REPORTED BY------------ The Drupal security team. ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ------------SA-2007-027 - TOKEN - CROSS SITE SCRIPTING ------------ * Advisory ID: DRUPAL-SA-2007-027 * Project: Several Modules That Use Token module * Version: 5.x * Date: 2007-October-17 * Security risk: Moderately critical * Exploitable from: Remote * Vulnerability: Cross site scripting ------------DESCRIPTION------------ Several server variables are not escaped consistently. When a malicious user is able to enter comments and then entice a victim to visit a webpage, arbitrary HTML and script code can be injected and executed in the context of the victim's session on the targeted website. For example, a malicious user with the 'post comments' or 'post comments without approval' permission would be able to inject arbitrary HTML and script code on the website. If the site uses the Token module to display that text in an HTML page on the site the malicious user can execute arbitrary HTML and script code on the website. Because the Token module provides a centralized API, several modules are impacted by this issue. The module may not be insecure on its own, but only when combined with another module or theme that uses it. Other affected areas are vocabulary names, term names, and usernames. Disabling the affected module provides an immediate workaround. Wikipedia has more information about cross site scripting [http://en.wikipedia.org/wiki/Xss ] (XSS). ------------VERSIONS AFFECTED------------ * ASIN Field Module 5.x before version 5.x-1.4 [http://drupal.org/node/181903 ] * e-Commerce Module 4.7.x-3.x before version 4.7.x-3.4 [ http://drupal.org/node/184325 ] * e-Commerce Module 5.x-3.x before version 5.x-3.4 [http://drupal.org/node/184322 ] * e-Commerce Module 5.x-4.x-beta before version 5.x-4.0-alpha5 [http://drupal.org/node/181681 ] * Fullname field for CCK Module 5.x before version 5.x-1.1 [http://drupal.org/node/183731 ] * Invite Module 5.x-1.8+ before version 5.x-1.12 [http://drupal.org/node/184334 ] * Node Relativity Module 5.x-2.1 before version 5.x-2.2 [ http://drupal.org/node/180401 ] * Pathauto Module 5.x-2.x before version 5.x-2.0-beta4 [ http://drupal.org/node/184264 ] * PayPal Node Module 5.x before version 5.x-1.1 [http://drupal.org/node/182933 ] * Token Module 4.7.x before version 4.7.x-1.5 [http://drupal.org/node/184257 ] * Token Module 5.x before version 5.x-1.9 [ ttp://drupal.org/node/184256 ] * Ubercart Module 5.x before version 5.x-1.0-alpha7e [http://drupal.org/node/180803 ] ------------SOLUTION------------ Upgrade to the latest version of Token module, and if you are running an earlier version of a module listed above upgrade that as well: * If you are running Drupal 4.7.x then upgrade to Token 4.7.x-1.5 [http://drupal.org/node/184257 ]. * If you are running Drupal 5.x then upgrade to Token 5.x-1.9 [http://drupal.org/node/184256 ]. * If you are running any of the other modules from the list above upgrade to the version specified in the list. ------------IMPORTANT NOTE------------ If you are the author of a module which depends on the Token module please read the API.txt file included with the token module for important information about how to deal with raw tokens. ------------REPORTED BY------------ Greg Knaddison (greggles [ http://drupal.org/user/36762 ]) of the Drupal security team. ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ------------SA-2007-028 - WEBLINKS - CROSS SITE SCRIPTING ------------ * Advisory ID: DRUPAL-SA-2007-028 * Project: Weblinks (third-party module) * Version: 4.7.x, 5.x * Date: 2007-October-17 * Security risk: Less critical * Exploitable from: Remote * Vulnerability: Cross site scripting ------------DESCRIPTION------------ User input is not properly sanitized on a number of pages. This allows malicious users to inject arbitrary HTML and script code into these pages, which may lead to administrator access if certain conditions are met. Learn more about cross site scripting on Wikipedia [ http://en.wikipedia.org/wiki/Cross_site_scripting ]. ------------VERSIONS AFFECTED------------ * Weblinks for Drupal 4.7.x before Weblinks 4.7.x-1.0. * Weblinks for Drupal 5.x before Weblinks 5.x-1.8. Drupal core is not affected. If you do not use the contributed Weblinks module, there is nothing you need to do. ------------SOLUTION------------ Install the latest version: * If you use Drupal 4.7.x upgrade to Weblinks 4.7.x-1.0 [http://drupal.org/node/184021 ]. * If you use Drupal 5.x upgrade to Weblinks 5.x-1.8 [http://drupal.org/node/184020 ]. See also the Weblinks project page [http://drupal.org/project/weblinks]. ------------REPORTED BY------------ The Weblinks module maintainer Brandon Bergren (Bdragon [ http://drupal.org/user/53081 ]). ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ------------SA-2007-029 - DRUPAL CORE - USER DELETION CROSS SITE REQUEST FORGERY------------ * Advisory ID: DRUPAL-SA-2007-029 * Project: Drupal core * Version: 5.x * Date: 2007-October-17 * Security risk: Moderately critical * Exploitable from: Remote * Vulnerability: Cross site request forgery ------------DESCRIPTION------------ The Drupal Forms API protects against cross site request forgeries (CSRF), where a malicous site can cause a user to unintentionally submit a form to a site where he is authenticated. The user deletion form does not follow the standard Forms API submission model and is therefore not protected against this type of attack. A CSRF attack may result in the deletion of users. ------------VERSIONS AFFECTED------------ * Drupal 5.x before version 5.3. ------------SOLUTION------------ Install the latest version: * If you are running Drupal 5.x then upgrade to Drupal 5.3 [ http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz ]. If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade. * To patch Drupal 5.2 use SA-2007-029-5.2.patch [http://drupal.org/files/sa-2007-029/SA-2007-029-5.2.patch ]. ------------REPORTED BY------------ This vulnerability was discovered during an audit of Drupal 5.1 by Stefan Esser and Mayflower GmbH. This audit was commissioned by die Zeit Online GmbH. We wish to thank die Zeit Online for sharing the results with us. ------------CONTACT------------ The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. --SA-2007-030 - DRUPAL CORE - API HANDLING OF UNPUBLISHED COMMENT. -- * Advisory ID: DRUPAL-SA-2007-030 * Project: Drupal core * Version: 4.7.x, 5.x * Date: 2007-October-17 * Security risk: Not critical * Exploitable from: Remote * Vulnerability: Access bypass ------------DESCRIPTION----------- The publication status of comments is not passed during the hook_comments API operation, causing various modules that rely on the publication status (such as Organic groups, or Subscriptions) to mail out unpublished comments. -----------VERSIONS AFFECTED------------ * Drupal 4.7.x before version 4.7.8 * Drupal 5.x before version 5.3. - -----------SOLUTION----------- Install the latest version: * If you are running Drupal 4.7.x then upgrade to Drupal 4.7.8. [http://ftp.drupal.org/files/projects/drupal-4.7.8.tar.gz ]. * If you are running Drupal 5.x then upgrade to Drupal 5.3. [http://ftp.drupal.org/files/projects/drupal-5.3.tar.gz ]. If you are unable to upgrade immediately, you can apply a patch to secure your installation until you are able to do a proper upgrade. * To patch Drupal 4.7.x use SA-2007-030-4.7.7.patch. [http://drupal.org/files/sa-2007-030/SA-2007-030-4.7.7.patch]. * To patch Drupal 5.2 use SA-2007-030-5.2.patch. [http://drupal.org/files/sa-2007-030/SA-2007-030-5.2.patch]. -----------REPORTED BY----------- The Drupal security team. -----------CONTACT----------- The security contact for Drupal can be reached at security at drupal.org or via the form at [ http://drupal.org/contact ]. ====================================================================== ========================================================= Les serveurs de référence du CERT-Renater http://www.urec.fr/securite http://www.cru.fr/securite http://www.renater.fr ========================================================= + CERT-RENATER | tel : 01-53-94-20-44 + + 151 bd de l'hôpital | fax : 01-53-94-20-41 + + 75013 Paris | email: certsvp@renater.fr + =========================================================