Courier-IMAP Remote Format String Vulnerability iDEFENSE Security Advisory 08.18.04: I. BACKGROUND Courier-IMAP is an IMAP/POP3 mail server popular on sites utilizing Qmail/Exim/Postfix. More information is available here: http://www.courier-mta.org/imap/ II. DESCRIPTION Remote exploitation of a format string vulnerability in Double Precision Inc.'s, Courier-IMAP daemon allows attackers to execute arbitrary code. The vulnerability specifically exists within the auth_debug() function defined in authlib/debug.c: void auth_debug( const char *fmt, va_list ap ) { char buf[DEBUG_MESSAGE_SIZE]; int i; int len; // print into buffer to be able to replace control and other // unwanted chars. vsnprintf( buf, DEBUG_MESSAGE_SIZE, fmt, ap ); len = strlen( buf ); // replace nonprintable chars by dot for( i=0 ; i