CVE-2007-5659 — Adobe Acrobat and Reader Buffer Overflow Vulnerability

CVE-2007-5659

Adobe Acrobat and Reader — Buffer Overflow in util.printf() JavaScript Method Enables Code Execution via Malicious PDF

What is Adobe Acrobat and Reader?

Adobe Acrobat and Adobe Reader are the dominant applications for creating, editing, and viewing PDF (Portable Document Format) files. PDF became an ISO standard and is ubiquitous in business, government, and consumer environments — used for contracts, invoices, official forms, academic papers, and technical documentation. Adobe Reader was the de facto standard free PDF viewer through the 2000s, installed on virtually every Windows PC. The PDF format supports JavaScript execution within documents, enabling interactive forms and dynamic content. This JavaScript engine inside the PDF viewer became a major attack surface, with Adobe Reader accumulating numerous high-severity vulnerabilities through the 2000s and early 2010s.

Overview

CVE-2007-5659 is a high-severity buffer overflow vulnerability (CWE-120, CVSS 7.8) in Adobe Acrobat and Reader. A specially crafted PDF file containing JavaScript that passes excessively long arguments to the util.printf() method triggers a buffer overflow in Acrobat/Reader's JavaScript engine, allowing arbitrary code execution when the document is opened. Adobe patched the vulnerability in Security Bulletin APSB08-13 (February 2008), releasing Acrobat and Reader 8.1.2. CISA added to KEV in June 2022 as part of a batch of legacy Adobe vulnerabilities still being exploited against unpatched Reader installations.

Affected Versions

Product Vulnerable Fixed
Adobe Acrobat 8.x before 8.1.2 Affected Upgrade to 8.1.2 or later
Adobe Reader 8.x before 8.1.2 Affected Upgrade to 8.1.2 or later
Adobe Acrobat 7.x Affected Apply APSB08-13 patch
Adobe Reader 7.x Affected Apply APSB08-13 patch

Note: Adobe Acrobat/Reader versions prior to version 11 are end-of-life and no longer receive security updates.

Technical Details

The vulnerability (CWE-120: Buffer Copy without Checking Size of Input) exists in Adobe Reader and Acrobat's implementation of the util.printf() JavaScript method. The PDF specification allows JavaScript embedded in a PDF document to call methods on JavaScript objects, including the util object which provides utility functions including formatted string output via util.printf().

The util.printf() method accepts a format string and arguments, similar to the C printf() function. In the vulnerable versions, when a format specifier in the format string was provided with an argument value that produced an excessively long output string (e.g., a %f format with a very large number, or a %s format with an extremely long string argument), the function wrote the formatted result into a fixed-size stack buffer without checking whether the output length would exceed the buffer.

This stack buffer overflow allowed an attacker to:

  1. Craft a PDF file with embedded JavaScript that calls util.printf() with a format string triggering the overflow
  2. The overflow overwrites the stack frame, including the saved return address
  3. With heap spraying or other memory manipulation, the return address is redirected to attacker-controlled shellcode
  4. Code execution occurs in the process context of Acrobat/Reader

The CVSS "Local" attack vector reflects that the PDF must be opened locally by the victim, typically via email attachment or download, rather than being directly exploitable over the network.

Discovery

Discovered by security researchers who identified the vulnerability in Adobe Reader's JavaScript method implementations. The disclosure and exploitation in early 2008, combined with Adobe's patch in APSB08-13, followed a pattern common for Adobe Reader vulnerabilities of this era. A related vulnerability, CVE-2008-2992, was discovered later in the same util.printf() implementation with a different overflow condition, indicating the function received inadequate security review.

Exploitation Context

Adobe Reader PDF exploits were among the most widely used malware delivery mechanisms from 2007 to 2012:

  • Malicious PDF campaigns: Attackers embedded exploit PDFs in email campaigns, serving them as attachments or via links to malicious websites. Because Adobe Reader was installed on nearly every Windows PC, PDF exploits provided extremely broad targeting capability.
  • Drive-by download: Compromised websites and malicious ad networks served exploit PDFs to visitors, triggering automatic exploitation when Reader's browser plugin opened the PDF.
  • Targeted spear phishing: High-value targets received contextually tailored PDFs — fake invoices, conference papers, government documents — that exploited Reader to deliver backdoors.
  • Criminal toolkit integration: Popular exploit kits of the era (MPack, Neosploit) included PDF exploits targeting CVE-2007-5659 and related vulnerabilities as standard payload delivery mechanisms.
  • Persistent legacy exposure: The June 2022 KEV addition reflects that unpatched Adobe Reader installations (particularly Reader 7/8 on legacy systems) were still being targeted in current attack campaigns.

Remediation

  1. Update Adobe Reader/Acrobat to a current version: If using Adobe Reader or Acrobat, upgrade to a current, supported version (Adobe Acrobat DC or Acrobat Reader DC).
  2. Disable JavaScript in Adobe Reader: In Reader preferences (Edit > Preferences > JavaScript), disable "Enable Acrobat JavaScript." This prevents virtually all JavaScript-based PDF exploits at the cost of some interactive PDF functionality.
  3. Replace Adobe Reader with an alternative: For organizations that don't require JavaScript or advanced PDF features, consider replacing Adobe Reader with a simpler PDF viewer (browser-native PDF rendering, SumatraPDF) that has a smaller attack surface.
  4. Scan email attachments: Deploy email security solutions that scan PDF attachments for embedded JavaScript and known exploit patterns.
  5. Disable the Reader browser plugin: Disable the Acrobat/Reader browser plugin so PDFs open in the standalone application rather than automatically in the browser, reducing the drive-by download attack surface.

Key Details

PropertyValue
CVE ID CVE-2007-5659
Vendor / Product Adobe — Acrobat and Reader
NVD Published2008-02-12
NVD Last Modified2025-10-22
CVSS 3.1 Score7.8
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-120 find similar ↗
CISA KEV Added2022-06-08
CISA KEV Deadline2022-06-22
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2022-06-22. Apply updates per vendor instructions.

Timeline

DateEvent
2008-01-01Malicious PDF files exploiting the util.printf() buffer overflow begin appearing in the wild
2008-02-07Adobe released Security Bulletin APSB08-13, patching Acrobat and Reader 8.1.2
2008-02-12CVE-2007-5659 published to NVD (CVE number assigned in 2007 for vulnerability disclosed in early 2008)
2022-06-08CISA added to KEV alongside other legacy Adobe Reader vulnerabilities
2022-06-22CISA BOD 22-01 remediation deadline

References

ResourceType
NVD — CVE-2007-5659 Vulnerability Database
CISA KEV Catalog Entry US Government
Adobe Security Bulletin APSB08-13 Vendor Advisory