VDB

CVE-2018-5158

CVE-2018-5158 PUBLISHED CVSS 8.800000190734863 HIGH

Malicious PDF can inject JavaScript into PDF Viewer

Reported by mozilla · Published June 11, 2018

pdfjs-dist is fixed in 2.0.550 and 1.10.100 (npm)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
pdfjs-distnpm2.0.550, 1.10.100
firefoxArch Linux60.0-1
firefoxmozilla60.0, 60, 52.8.0
firefoxUbuntu:18.04:LTS60.0+build2-0ubuntu1
firefoxUbuntu:16.04:LTS60.0+build2-0ubuntu0.16.04.1
Firefox ESRMozilla52.8
firefoxUbuntu:14.04:LTS60.0+build2-0ubuntu0.14.04.1

Risk scores

CVSS 3.0
8.800000190734863
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
MozillaFirefox ESRunspecified
MozillaFirefoxunspecified
MozillaFirefox*
npmpdfjs-dist0
MozillaFirefox ESR*
archfirefox0

Timeline

  • Jun 11, 2018 CVE Published
  • May 23, 2020 PoC Published
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Mar 6, 2026 Distribution Patch (4 in total, the first dated here)
  • Mar 6, 2026 Security Advisory (7 in total, the first dated here)
  • Sep 20, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2018-5158
vulnetix vdb fixes CVE-2018-5158

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-5158/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›