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
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:
- Read local files — access any file readable by the user via
file://URIs, including SSH keys, configuration files, environment files, browser profiles, and documents - 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
-
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.
-
Keep Firefox current — Firefox receives regular security updates; enabling automatic updates prevents vulnerability exposure windows.
-
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.
-
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
| Property | Value |
|---|---|
| CVE ID | CVE-2015-4495 |
| Vendor / Product | Mozilla — Firefox |
| NVD Published | 2015-08-08 |
| NVD Last Modified | 2025-10-22 |
| CVSS 3.1 Score | 8.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-200 — Exposure of Sensitive Information to an Unauthorized Actor find similar ↗ |
| CISA KEV Added | 2022-05-25 |
| CISA KEV Deadline | 2022-06-15 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2015-08-06 | Active exploitation of CVE-2015-4495 detected in the wild; exploit embedded in Russian news site advertisement stealing local files from Firefox users |
| 2015-08-06 | Mozilla notified by security researcher Cody Crews; exploit code posted to Mozilla's bug tracker |
| 2015-08-07 | Mozilla releases Firefox 39.0.3 and Firefox ESR 38.1.1 emergency out-of-band updates addressing CVE-2015-4495 |
| 2015-08-08 | CVE-2015-4495 published by NVD |
| 2022-05-25 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-06-15 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2015-4495 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Mozilla Security Advisory MFSA 2015-78 — CVE-2015-4495 | Vendor Advisory |
| Mozilla Security Blog — Firefox exploit found in the wild | Security Research |