-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                    ESB-2007.0810 -- [Win][UNIX/Linux]
                    Multiple vulnerabilities in Drupal
                              23 October 2007

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:              Drupal Core 4.7.x, 5.x
                      Weblinks 4.7.x, 5.x
                      Several Modules that use Token module 5.x
Publisher:            Drupal
Operating System:     UNIX variants (UNIX, Linux, OSX)
                      Windows
Impact:               Execute Arbitrary Code/Commands
                      Inappropriate Access
                      Cross-site Scripting
Access:               Remote/Unauthenticated
CVE Names:            CVE-2007-3017 CVE-2007-5416 CVE-2007-5593
                      CVE-2007-5594 CVE-2007-5595 CVE-2007-5596
                      CVE-2007-5597 CVE-2007-5598

Comment: This bulletin contains eight (8) Drupal security announcements.
         Five of these are for Drupal Core, one (1) is a PHP vulnerability,
         and two (2) are third party modules.

Revision History:  October 23 2007: Added CVEs
                   October 18 2007: Initial Release

- --------------------------BEGIN INCLUDED TEXT--------------------


- ------------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 [ http://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 ].


- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBRx1Z2Ch9+71yA2DNAQISdwP+P+geZvSa6wHJ5Px39B8G22Y9q/Ajf2PZ
d4FglXlxY3vOFJDUOv/bXpyfNUJhlEP1swvDVDwsoKbmcUrs2VQ8VY640WTBK2A+
XhcxM53YRo7sljd21yawYdVsJk5E8sQGru+cg4vs9+hNokBS2UomBgLYDQ2YvF99
wuLbMnkOIgE=
=qzIg
-----END PGP SIGNATURE-----