CVE-2018-5158
The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a…
- 8.8HighCVSS base score
- 10.3%Exploitation in 30 daysEPSS · top 4.3% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By mozilla
- 5 months later
· 5 months later
Published
- 6 years later
· 6 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.0 | High8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 10.3% · top 4.3% of all CVEs (10 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
- affected unspecified – < 52.8
- affected unspecified – < 60
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmpdfjs-distGHSA-7jg2-jgv3-fmr4 (opens in a new tab)
References
11
- RHSA-2018:1415 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- GLSA-201810-01 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- RHSA-2018:1414 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- https://www.mozilla.org/security/advisories/mfsa2018-11/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- 1040896 (opens in a new tab)vdb-entryx_refsource_SECTRACKx_transferred
- DSA-4199 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- USN-3645-1 (opens in a new tab)vendor-advisoryx_refsource_UBUNTUx_transferred
- [debian-lts-announce] 20180511 [SECURITY] [DLA 1376-1] firefox-esr security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- https://bugzilla.mozilla.org/show_bug.cgi?id=1452075 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://www.mozilla.org/security/advisories/mfsa2018-12/ (opens in a new tab)x_refsource_CONFIRMx_transferred
- 104136 (opens in a new tab)vdb-entryx_refsource_BIDx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-3023 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-7jg2-jgv3-fmr4 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2018-5158)Record last updated .