CVE-2018-5158
HIGH 8.8CVSS 3.0Malicious PDF can inject JavaScript into PDF Viewer
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.
- Published
- 11 Jun 2018
- Last modified
- 17 Jun 2026
- Assigned by
- security@mozilla.org
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-7jg2-jgv3-fmr4
- Sources
- NVDJSONOSV GHSA-7jg2-jgv3-fmr4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* |
= 8.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | redhat | enterprise_linux_desktopcpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_desktopcpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_servercpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_servercpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* |
= 7.5 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_workstationcpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:* |
= 6.0 | |
| NVD | redhat | enterprise_linux_workstationcpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | mozilla | firefoxcpe:2.3:a:mozilla:firefox:*:*:*:*:*:*:*:* |
< 52.8.0 | 52.8.0 |
| NVD | mozilla | firefoxcpe:2.3:a:mozilla:firefox:*:*:*:*:*:*:*:* |
< 60.0 | 60.0 |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:* |
= 14.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* |
= 16.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:* |
= 17.10 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* |
= 18.04 | |
| OSV | npm | pdfjs-dist | >= 2.0.0, < 2.0.550 | 2.0.550 |
| OSV | npm | pdfjs-dist | < 1.10.100 | 1.10.100 |
References
- http://www.securityfocus.com/bid/104136 · Third Party Advisory, VDB Entry, WEB
- http://www.securitytracker.com/id/1040896 · Third Party Advisory, VDB Entry, WEB
- https://access.redhat.com/errata/RHSA-2018:1414 · Third Party Advisory, WEB
- https://access.redhat.com/errata/RHSA-2018:1415 · Third Party Advisory, WEB
- https://bugzilla.mozilla.org/show_bug.cgi?id=1452075 · Issue Tracking, Vendor Advisory, WEB
- https://lists.debian.org/debian-lts-announce/2018/05/msg00007.html · Mailing List, Third Party Advisory, WEB
- https://security.gentoo.org/glsa/201810-01 · Third Party Advisory, WEB
- https://usn.ubuntu.com/3645-1/ · Third Party Advisory, WEB
- https://www.debian.org/security/2018/dsa-4199 · Third Party Advisory, WEB
- https://www.mozilla.org/security/advisories/mfsa2018-11/ · Vendor Advisory, WEB
- https://www.mozilla.org/security/advisories/mfsa2018-12/ · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2018-5158 · ADVISORY
- https://github.com/mozilla/pdf.js/pull/9659 · WEB
- https://github.com/mozilla/pdf.js/commit/2dc4af525d1612c98afcd1e6bee57d4788f78f97 · WEB
- https://github.com/mozilla/pdf.js · PACKAGE
History
- 25 Nov 2026 20:21 UTC · NVD: first stored (published 11 Jun 2018)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 14 May 2022)