{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2018-5158","id":"CVE-2018-5158","title":"Malicious PDF can inject JavaScript into PDF Viewer","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.","descriptionLong":"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":"2018-06-11T21:00:00.000Z","updated":"2026-06-17T01:59:44.243Z","reserved":"2018-01-03T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mozilla","metric":{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["Mozilla Firefox ESR","Mozilla Firefox"],"affectedProducts":[{"vendor":"Mozilla","product":"Firefox ESR","defaultStatus":null,"versions":[{"lessThan":"52.8","status":"affected","version":"unspecified","versionType":"custom"}],"platforms":[]},{"vendor":"Mozilla","product":"Firefox","defaultStatus":null,"versions":[{"lessThan":"60","status":"affected","version":"unspecified","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"pdfjs-dist","purl":"pkg:npm/pdfjs-dist","ranges":[">=2.0.0 <2.0.550","<1.10.100"],"fixed":["2.0.550","1.10.100"],"advisory":"GHSA-7jg2-jgv3-fmr4"}],"cwes":["CWE-94"],"aliases":["GHSA-7jg2-jgv3-fmr4"],"references":[{"url":"https://access.redhat.com/errata/RHSA-2018:1415","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://security.gentoo.org/glsa/201810-01","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2018:1414","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.mozilla.org/security/advisories/mfsa2018-11/","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory"]},{"url":"http://www.securitytracker.com/id/1040896","tags":["vdb-entry","x_refsource_SECTRACK","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://www.debian.org/security/2018/dsa-4199","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://usn.ubuntu.com/3645-1/","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/05/msg00007.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://bugzilla.mozilla.org/show_bug.cgi?id=1452075","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Vendor Advisory","report","web"]},{"url":"https://www.mozilla.org/security/advisories/mfsa2018-12/","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory"]},{"url":"http://www.securityfocus.com/bid/104136","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5158","tags":["advisory"]},{"url":"https://github.com/mozilla/pdf.js/pull/9659","tags":["web"]},{"url":"https://github.com/mozilla/pdf.js/commit/2dc4af525d1612c98afcd1e6bee57d4788f78f97","tags":["web"]},{"url":"https://github.com/mozilla/pdf.js","tags":["package"]},{"url":"https://usn.ubuntu.com/3645-1","tags":["web"]},{"url":"https://www.mozilla.org/security/advisories/mfsa2018-11","tags":["web"]},{"url":"https://www.mozilla.org/security/advisories/mfsa2018-12","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.10285,"epssPercentile":0.95788,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2018-5158","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5158","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2018-5158","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-7jg2-jgv3-fmr4","ok":true,"note":"GHSA-7jg2-jgv3-fmr4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2018-5158","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["firefox"],"critical":["EPSS 10% with CVSS 8.8"],"attention":null}