Back to Advisories


Rapid7 Advisory R7-0013: Heap Corruption in Gaim-Encryption Plugin

CVE: CAN-2003-0163
Bugtraq ID: 7182


April 11, 2003 - GAIM is a multi-protocol instant messaging client that is compatible with AIM, ICQ, MSN Messenger, Jabber, and other protocols. The Gaim-Encryption plugin provides transparent message encryption between two users.

The Gaim-Encryption plugin does insufficient validation on the message length parameter supplied by a remote user. This allows an arbitrary heap location to be overwritten with a zero byte and will also cause an unbounded read into the heap.

The most obvious impact of this vulnerability would be a denial of service to the GAIM client. While this vulnerability is not likely to be exploitable, exploitation cannot be ruled out.

Please note that Gaim-Encryption is not part of GAIM and is not developed by GAIM.

Affected system(s):


  • gaim-encryption 1.15 and earlier


  • gaim-encryption 1.16 and later

Vendor Info

William Tompkins

The author was notified and a fixed version was released on March 16th, 2003.

Detailed Analysis

The decrypt_msg function is responsible for decrypting encrypted GAIM messages. It reads the message length from a user-supplied header using sscanf. While some bounds checking is performed, a negative length is not properly handled. This causes the NUL termination of the message string to place a zero byte in an arbitrary location in memory rather than at the end of the string where it belongs.


Upgrade to version 1.16 of the Gaim-Encryption plugin. Note that while a patched version of 1.15 was released, some versions of 1.15 may still be vulnerable.

Disclaimer & Copyright

Rapid7, LLC is not responsible for the misuse of the information provided in our security advisories. These advisories are a service to the professional security community. There are NO WARRANTIES with regard to this information. Any application or distribution of this information constitutes acceptance AS IS, at the user's own risk. This information is subject to change without notice.

This advisory Copyright (C) 2003 Rapid7, LLC. Permission is hereby granted to redistribute this advisory, providing that no changes are made and that the copyright notices and disclaimers remain intact.