__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Perl Format String Vulnerabilities [US-CERT Vulnerability Note VU#946969] January 5, 2006 19:00 GMT Number Q-088 ______________________________________________________________________________ PROBLEM: Perl programs providing user-controlled I/O format strings may contain format string vulnerabilities. PLATFORM: Perl DAMAGE: Perl programs that pass user data to routines that subsequently use that data as a format string may be vulnerable. SOLUTION: Programs written in Perl that contain format string vulnerabilities should be changed to not include user data in format strings. ______________________________________________________________________________ VULNERABILITY The risk is HIGH. Perl programs that pass user data to routines ASSESSMENT: that subsequently use that data as a format string may be vulnerable. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/q-088.shtml ORIGINAL BULLETIN: US-CERT Vulnerability Note VU#946969 http://www.kb.cert.org/vuls/id/946969 ______________________________________________________________________________ [***** Start US-CERT Vulnerability Note VU#946969 *****] Vulnerability Note VU#946969 Perl programs providing user-controlled I/O format strings may contain format string vulnerabilities Overview Programs written in Perl may contain many of the same types of format string vulnerabilities as programs written in C. I. Description Perl is a programming language used in many applications and commonly used for web applications. It provides many of the same functions for formatted I/O as C, including sprintf() and printf(). As a result, programs written Perl may contain format string vulnerabilities similar to the types of format string vulnerabilities found in C programs. Note: Although there has been increased interest in this issue recently, it has been known since at least 2002 that programs written in Perl may contain format string vulnerabilities. II. Impact Perl programs that pass user data to routines that subsequently use that data as a format string may be vulnerable. Such routines include, but are not limited to, printf(), sprintf(), and syslog(). III. Solution Repair Perl Program Programs written in Perl that contain format string vulnerabilities should be changed to not include user data in format strings. Taint Mode Perl provides a "taint" mode (-T) that may detect format strings that include user data. However, taint mode will not catch all format string vulnerabilities and, when it does detect an error, the program will be terminated. Thus, taint mode may stop a vulnerability from allowing an attacker to execute arbitrary code, but such a vulnerability can still be used to terminate the program. Systems Affected Vendor Status Date Updated Perl Developers Unknown 1-Dec-2005 References http://archives.neohapsis.com/archives/fulldisclosure/2005-12/0066.html Credit This vulnerability was reported to CERT/CC by Steve Christey of MITRE. This document was written by Hal Burch. Other Information Date Public 12/05/2005 Date First Published 12/06/2005 11:42:10 AM Date Last Updated 01/04/2006 CERT Advisory CVE Name Metric 13.77 Document Revision 26 [***** End US-CERT Vulnerability Note VU#946969 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of US-CERT 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) Q-077: Citrix Vulnerability in Program Neighborhood Client Q-078: cURL Security Update Q-079: HP-UX Running Software Distributor Remote Unauthorized Access Q-081: netpbm Security Update Q-082: perl Security Update Q-083: perl Security Update for Red Hat (v.3) Q-084: Cisco Security Notice: Response to DoS in Cisco Clean Access Q-085: Microsoft Windows Metafile File (WMF) Vulnerability Q-086: MS Advisory Win32/Sober.Z@mm on January 6, 2006 Q-087: Blackberry Attachment Service Vulnerability