Vulnerabilityin Mozilla Firefox ESR.
Proof of concept public (GitHub).
The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file. This JavaScript can then be run with the permissions of the PDF viewer by its worker. This vulnerability affects Firefox ESR < 52.8 and Firefox < 60.
- Upgrade Firefox ESR to 52.8 or later.
- Upgrade Firefox to 60 or later.
- Upgrade pdfjs-dist (npm) to 1.10.100, 2.0.550 or later, whichever matches your release line.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 3 Jan 2018CVE ID reserved by mozilla.
- 11 Jun 2018Published in the CVE List.
- 26 Jan 2024First public proof of concept on GitHub.
- 5 Aug 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: Proof of concept (GitHub).
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Other Firefox ESR vulnerabilities
- access.redhat.com vendor-advisory, x_refsource_REDHAT
- security.gentoo.org vendor-advisory, x_refsource_GENTOO
- access.redhat.com vendor-advisory, x_refsource_REDHAT
- www.mozilla.org x_refsource_CONFIRM
- www.securitytracker.com vdb-entry, x_refsource_SECTRACK
- www.debian.org vendor-advisory, x_refsource_DEBIAN
- usn.ubuntu.com vendor-advisory, x_refsource_UBUNTU
- lists.debian.org mailing-list, x_refsource_MLIST
- bugzilla.mozilla.org x_refsource_CONFIRM
- www.mozilla.org x_refsource_CONFIRM
- www.securityfocus.com vdb-entry, x_refsource_BID
Patchminder. CVE-2018-5158: Vulnerability in Mozilla Firefox ESR. https://patchminder.com/cve/cve-2018-5158/ (accessed 5 December 2026).