Adobe Acrobat getAnnots Vulnerability

May 14, 2009

Adobe Acrobat and Adobe Reader are ubiquitous applications for viewing PDF (Portable Document Format) documents.

Since version 4.0, Acrobat includes JavaScript functionality allowing for customization and extensibility. Acrobat JavaScript is an extension of the core JavaScript which adds Acrobat-specific classes that enable the author to manage document related tasks. These classes include app, dbg, console, Doc, SOAP, ADBC, util, etc.

An annot object represents a particular Acrobat annotation created using the Acrobat annotation tool. Annotation types include: Text, FreeText, Line, Square, Circle, Polygon, PolyLine, Highlight, etc. The Doc object provides the getAnnots method, which returns an array of Annot Objects based on the parameters provided to it, or returns a Null value if no results are found. This method accepts four parameters:

getAnnots(nPage, nSortBy, bReverse, nFilterBy)

  • nPage: A 0-based page number that specifies from which page to get Annots.
  • nSortBy: A sort method applied to the array.
  • bReverse: If true, causes the array to be reverse sorted.
  • nFilterBy: Gets only those annotations that satisfy certain criteria.

There exists a buffer overflow vulnerability in Adobe Acrobat/Reader. Specifically, the vulnerability is due to improper parsing of the getAnnots JavaScript function. The code does not validate the parameters passed to the function. When all four parameters are passed as negative numbers, the program memory will be corrupted.

An attacker can exploit this vulnerability by enticing a user to open a crafted PDF document. Successful exploitation would allow for arbitrary code injection and execution with the privileges of the currently logged in user. Code injection that does not result in execution would terminate the application due to memory corruption.

The vulnerability has been assigned as CVE-2009-1492.

SonicWALL has released a IPS signature to detect and block specific exploitation attempts targeting this vulnerability. The signature is listed bellow:

  • 5503 - Adobe Reader getAnnots Method Memory Corruption Attempt