CVE-2015-4495 — Mozilla Firefox Security Feature Bypass Vulnerability

CVE-2015-4495

Mozilla Firefox / PDF.js — Same Origin Policy Bypass via PDF.js Zero-Day Actively Used to Steal Local Files; Emergency Firefox 39.0.3 (August 2015)

What Is PDF.js?

PDF.js is Mozilla's open-source, JavaScript-based PDF renderer built into Firefox. Rather than relying on a native plugin (like Adobe Acrobat), Firefox uses PDF.js to render PDF documents entirely within the browser using JavaScript and HTML5 Canvas. PDF.js runs in a privileged browser context to handle PDF rendering — but in vulnerable versions, a flaw in how it handles certain PDF content allowed attacker-controlled JavaScript to escape normal web content security restrictions and access local filesystem resources.

Overview

Actively Exploited. This vulnerability has been added to CISA's Known Exploited Vulnerabilities (KEV) Catalog on May 25, 2022. Federal agencies are required to apply mitigations per BOD 22-01.

CVE-2015-4495 is a Same Origin Policy (SOP) bypass vulnerability in Mozilla Firefox's built-in PDF.js renderer that was actively exploited in the wild to steal files from victims' computers before Mozilla released an emergency patch. The exploit — discovered deployed in advertisement code on a Russian news website — used a specially crafted PDF to bypass Firefox's security sandbox and read arbitrary local files, then uploaded the stolen files to a remote server. Mozilla released an emergency out-of-band update Firefox 39.0.3 on August 7, 2015, one day after the exploit was discovered in active use.

Affected Versions

Firefox Version Status
Firefox 39.0 and earlier Vulnerable
Firefox ESR 38.1.0 and earlier Vulnerable
Firefox 39.0.3 Fixed
Firefox ESR 38.1.1 Fixed

Technical Details

Root Cause: PDF.js Same Origin Policy Bypass

CVE-2015-4495 exploits a flaw in how Firefox's PDF.js renderer handles JavaScript within PDF content. PDF.js is executed in a privileged context within Firefox — it has access to Firefox's internal APIs including the ability to read file:// URLs (local files). A crafted PDF containing malicious JavaScript could exploit a parsing flaw to break out of the expected PDF rendering context and execute JavaScript that could:

  1. Read local files — access any file readable by the user via file:// URIs, including SSH keys, configuration files, environment files, browser profiles, and documents
  2. Exfiltrate data — make XMLHttpRequest calls to send stolen file contents to an attacker-controlled server

The exploit worked because PDF.js code running in the special PDF rendering context was not properly isolated from Firefox's privileged APIs despite appearing to operate in a web content context.

Real-World Exploit Behavior

The actively exploited version of the exploit specifically targeted:

  • Linux users: /etc/passwd, /etc/group, /etc/hosts, /etc/hostname, /etc/issue, .bash_history, .bash_profile, .bashrc, SSH private keys (~/.ssh/id_rsa), Subversion credentials (~/.subversion/auth/), S3 credentials (~/.s3cfg), and similar developer/sysadmin files
  • Windows users: similar credential and configuration file theft
  • macOS users: targeted similarly

Stolen data was exfiltrated to a server with a Ukrainian IP address.

Attack Characteristics

Attribute Detail
Attack Vector Network — malicious PDF content delivered via web page or ad
User Interaction Required (visit page / view PDF)
Impact Arbitrary local file read; credential theft
Delivery Malvertising (embedded in ad on news site)
Targets Linux/Mac/Windows Firefox users (any platform)
Data Stolen SSH keys, credentials, config files, developer secrets

Discovery

Security researcher Cody Crews discovered the exploit deployed in the wild and reported it to Mozilla on August 6, 2015. The exploit was found embedded in advertisement code on a Russian news site — visitors with Firefox had their files scanned and stolen without any indication beyond a brief page load pause. Mozilla responded within 24 hours with an emergency out-of-band release.

Exploitation Context

  • Zero-day file theft: CVE-2015-4495 was used for targeted credential theft against developers and system administrators — the files targeted (SSH keys, S3 credentials, Subversion auth, .bashrc) indicate the attacker was specifically interested in access credentials for further infrastructure compromise
  • Malvertising delivery: The exploit reached victims through compromised or purchased advertising inventory on a legitimate Russian news site, exposing any Firefox user who visited the site — not just those who opened PDFs
  • Cross-platform impact: Unlike Flash exploits targeting specific OS/browser combinations, the PDF.js exploit worked against Firefox on Linux, Windows, and macOS — a significant advantage
  • Responsible disclosure and rapid response: Mozilla's 24-hour turnaround from discovery to patch release was exemplary; the coordinated disclosure and immediate patch availability limited the exploitation window
  • CISA KEV (2022): Added May 2022, years after the patch, reflecting continued exploitation of unpatched Firefox versions in legacy environments

Remediation

CISA BOD 22-01 Deadline: June 15, 2022. Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
  1. Update Firefox — upgrade to Firefox 39.0.3 or later (any current Firefox version is patched). Firefox 39.0.3 was released August 7, 2015.

  2. Keep Firefox current — Firefox receives regular security updates; enabling automatic updates prevents vulnerability exposure windows.

  3. Rotate compromised credentials — if the device ran a vulnerable Firefox version on a page with advertising content between August 2015 and the patch, assume SSH keys, S3 credentials, Subversion credentials, and other secrets stored in home directory configuration files may have been compromised. Rotate affected credentials.

  4. Review access logs — for organizations with logging infrastructure, check for unauthorized access using credentials that may have been stolen during the exploitation window.

Key Details

PropertyValue
CVE ID CVE-2015-4495
Vendor / Product Mozilla — Firefox
NVD Published2015-08-08
NVD Last Modified2025-10-22
CVSS 3.1 Score8.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor find similar ↗
CISA KEV Added2022-05-25
CISA KEV Deadline2022-06-15
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
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-15. Apply updates per vendor instructions.

Timeline

DateEvent
2015-08-06Active exploitation of CVE-2015-4495 detected in the wild; exploit embedded in Russian news site advertisement stealing local files from Firefox users
2015-08-06Mozilla notified by security researcher Cody Crews; exploit code posted to Mozilla's bug tracker
2015-08-07Mozilla releases Firefox 39.0.3 and Firefox ESR 38.1.1 emergency out-of-band updates addressing CVE-2015-4495
2015-08-08CVE-2015-4495 published by NVD
2022-05-25Added to CISA Known Exploited Vulnerabilities catalog
2022-06-15CISA BOD 22-01 remediation deadline