Skip to content
Noroxi
NVD / CVE Program· CNA mozilla

CVE-2018-5158: The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a…

HighCVSS 8.8 · v3.0—Proof of concept Fix available

Noroxi assessment

Priority: Monitor (action score 38/100)

  • Public proof-of-concept code exists (GitHub); there is no record of exploitation in the wild.
  • Probability of exploitation in the next 30 days: 10.2% (FIRST EPSS); higher than 95.7% of all records.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
  • Fixed version: firefox-esr (Debian:12) 52.8.0esr-1; firefox-esr (Debian:7) 52.8.0esr-1~deb7u1; firefox-esr (Debian:8) 52.8.0esr-1~deb8u1.

Low priority for now. Upgrade to firefox-esr (Debian:12) 52.8.0esr-1; firefox-esr (Debian:7) 52.8.0esr-1~deb7u1; firefox-esr (Debian:8) 52.8.0esr-1~deb8u1 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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
Jun 11, 2018
Updated
Jun 16, 2026
EPSS
10.2% · 95th percentile

Report tools

JSON

Action score

38

Monitor

Low priority for now.

CVSS
35 / 40 · 8.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
3 / 30 · 10.2%

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • Proof of concept exists, no weaponized module
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2018-5158

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Is the PDF.js on your site affected?Scan JavaScript libraries

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Is the PDF.js on your site affected?Scan JavaScript libraries

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
debiandebian linux
redhatenterprise linux desktop
redhatenterprise linux server
redhatenterprise linux server aus
redhatenterprise linux server eus
redhatenterprise linux server tus
redhatenterprise linux workstation
mozillafirefox
canonicalubuntu linux

Is the PDF.js on your site affected?

The free JavaScript library scanner reads the PDF.js version from the files your site loads, matches this record and other known vulnerabilities, and gives the safe version on the same branch. If the version can't be read, it says so. No account needed.

Scan JavaScript libraries

Versions reported by the vendor

Affected version ranges reported by the assigning authority (mozilla). Independent of NVD's CPE analysis and usually ahead of it.

  • Mozilla Firefox

    • unspecified and later · before 60affected
  • Mozilla Firefox ESR

    • unspecified and later · before 52.8affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:12firefox-esrbefore 52.8.0esr-152.8.0esr-1
Debian:7firefox-esrbefore 52.8.0esr-1~deb7u152.8.0esr-1~deb7u1
Debian:8firefox-esrbefore 52.8.0esr-1~deb8u152.8.0esr-1~deb8u1
Debian:9firefox-esrbefore 52.8.0esr-1~deb9u152.8.0esr-1~deb9u1
npmpdfjs-distfrom 2.0.0 · before 2.0.5502.0.550
npmpdfjs-distbefore 1.10.1001.10.100
Red Hat:enterprise_linux:6::clientfirefoxbefore 0:52.8.0-1.el6_90:52.8.0-1.el6_9
Red Hat:enterprise_linux:6::clientfirefox-debuginfobefore 0:52.8.0-1.el6_90:52.8.0-1.el6_9
Red Hat:enterprise_linux:7::clientfirefoxbefore 0:52.8.0-1.el7_50:52.8.0-1.el7_5
Red Hat:enterprise_linux:7::clientfirefox-debuginfobefore 0:52.8.0-1.el7_50:52.8.0-1.el7_5
SUSE:Linux Enterprise Module for Desktop Applications 15MozillaFirefoxbefore 52.9.0esr-3.7.1252.9.0esr-3.7.12
SUSE:Linux Enterprise Software Development Kit 11 SP4MozillaFirefoxbefore 52.8.0esr-72.32.152.8.0esr-72.32.1
SUSE:OpenStack Cloud 7MozillaFirefoxbefore 52.8.0esr-109.31.252.8.0esr-109.31.2

Other highest-scoring records for the same primary product.

  • CVE-2016-9079A use-after-free vulnerability in SVG Animation has been discovered.KEV
    86Now
  • CVE-2024-44308The issue was addressed with improved checks.KEV
    68This week
  • CVE-2021-25216A second vulnerability in BIND's GSSAPI security policy negotiation can be targeted by a buffer overflow attack
    64This week

Published before and after this one in the same product

  • ← EarlierCVE-2018-5154Jun 11, 2018 · A use-after-free vulnerability can occur while enumerating attributes during SVG animations with clip paths.
    40Plan
  • ← EarlierCVE-2018-5155Jun 11, 2018 · A use-after-free vulnerability can occur while adjusting layout during SVG animations with text paths.
    40Plan
  • Later →CVE-2018-5159Jun 11, 2018 · An integer overflow can occur in the Skia library due to 32-bit integer use in an array without integer overflow checks, resulting in…
    45Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
debian:firefox-esr52.8.0esr-1 · Debian:12Package registry (OSV)
npm:pdfjs-dist1.10.100Package registry (OSV)
npm:pdfjs-dist2.0.550Package registry (OSV)
red hat:firefox0:52.8.0-1.el6_9 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
red hat:firefox-debuginfo0:52.8.0-1.el6_9 · Red Hat:enterprise_linux:6::clientPackage registry (OSV)
suse:MozillaFirefox52.8.0esr-72.32.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4Package registry (OSV)

Exploit status

Proof of concept available

A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.

Evidence

  • Proof-of-concept repository on GitHub ×1

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Proof-of-concept repository on GitHubstars:12024-01-26

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. Published
  2. First PoC+2054 d
  3. TodayNov 16, 2026+3079 d
EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Not on record for this CVE: patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • A user must open a link or visit a page.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

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

nvd-primary

References

All records