__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Python XML-RPC Server Vulnerability [Python Security Advisory PSF-2005-001] February 4, 2005 19:00 GMT Number P-121 [REVISED 14 Feb 2005] [REVISED 22 Feb 2005] [REVISED 11 Mar 2005] ______________________________________________________________________________ PROBLEM: A vulnerability was discovered in the SimpleXMLRPCServer library module in Python. Python is an interpreted, interactive, object-oriented programming language. PLATFORM: 2.2 all versions, 2.3 prior to 2.3.5, 2.4 Debian GNU/Linux 3.0 (woody) Red Hat Desktop (v. 3 and v. 4) Red Hat Enterprise Linux AS, ES, WS (v.3 and v.4) SGI Advanced Linux Environnment 3 for Patch 10144 for SGI ProPack 3 Service Pack 4. DAMAGE: This flaw gives remote attackers access to internals of a registered object, or its module or possibly other modules. SOLUTION: Apply the available patches. ______________________________________________________________________________ VULNERABILITY The risk is LOW. This vulnerability may lead to data loss or ASSESSMENT: execution of arbitrary code. The flaw only affects Python XML-RPC servers that use the register_instance() method to register an object without a _dispatch() method. Servers using only register_function() are not affected. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/p-121.shtml ORIGINAL BULLETIN: http://www.python.org/security/PSF-2005-001/ ADDITIONAL LINKS: Debian Security Advisory DSA 666-1 http://www.debian.org/security/2005/dsa-666 Red Hat Security Advisory RHSA-2005:109-04 https://rhn.redhat.com/errata/RHSA-2005-109.html Red Hat Security Advisory RHSA-2005:108-05 https://rhn.redhat.com/errata/RHSA-2005-108.html SGI Security Advisory 20050207-01-U Security Update #27 http://www.sgi.com/support/security/advisories.html CVE/CAN: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name= CAN-2005-0089 ______________________________________________________________________________ REVISION HISTORY: 2/14/2005 - added link to Red Hat Security Advisory RHSA-2005:109-04 that provides updated packages for this vulnerability. 2/22/2005 - added link to Red Hat Security Advisory RHSA-2005:108-05 that provides updated packages for Red Hat version 4. 3/11/2005 - revised P-121 to add a link to SGI Security Advisory 20050207-01-U SGI Advanced Linux Environnment 3 Security Update #27 for Pacth 10144 for SGI ProPack 3 Service Pack 4. [***** Start Python Security Advisory PSF-2005-001 *****] --------------------------------------------------------------------- Python Security Advisory Advisory ID: PSF-2005-001 Issue Date: February 3, 2005 Product: Python Versions: 2.2 all versions, 2.3 prior to 2.3.5, 2.4 CVE Names: CAN-2005-0089 --------------------------------------------------------------------- Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. The Python development team has discovered a flaw in the SimpleXMLRPCServer library module which can give remote attackers access to internals of the registered object or its module or possibly other modules. The flaw only affects Python XML-RPC servers that use the register_instance() method to register an object without a _dispatch() method. Servers using only register_function() are not affected. On vulnerable XML-RPC servers, a remote attacker may be able to view or modify globals of the module(s) containing the registered instance's class(es), potentially leading to data loss or arbitrary code execution. If the registered object is a module, the danger is particularly serious. For example, if the registered module imports the os module, an attacker could invoke the os.system() function. But the attack is not limited to registered object modules; for example, the code in the Python cookbook recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/165375 is vulnerable to an attack using im_func.func_globals.update which allows reading or modifying the global variable accessList. The Common Vulnerabilities and Exposures project (cve.mitre.org) has assigned the name CAN-2005-0089 to this issue. Python 2.3.5 will be released from www.python.org within a few days containing a fix for this issue. Python 2.4.1 will be released later this month containing the same fix. Patches for Python 2.2, 2.3 and 2.4 are also immediately available: - http://python.org/security/PSF-2005-001/patch-2.2.txt (Python 2.2) - http://python.org/security/PSF-2005-001/patch.txt (Python 2.3, 2.4) Note that these patches disable recursive traversal, potentially resulting in reduced functionality of XML-RPC applications depending on this feature. Acknowledgement: thanks to Graham Dumpleton for reporting this issue. [***** End Python Security Advisory PSF-2005-001 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Python Software Foundation for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) P-111: Cisco Multiple Crafted IPv6 Packets Cause Reload P-112: Updated less Package Fixes Security Issue P-113: BIND Vulnerabilities P-114: BIND: Self Check Failing P-115: libpam-radius-auth P-116: Apple Security Update for Mac OS X P-117: UW-imapd Fails to Properly Authenticate Users When Using CRAM-MD5 P-118: IBM AIX 5.3 NIS Client Vulnerability P-119: Cisco IP/VC Products Hard-Coded Community Strings P-120: Eudora Email Vulnerability