Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. pdfjs-dist
  4. ›
  5. CVE-2018-5158

CVE-2018-5158: Code injection

June 11, 2018 (updated March 13, 2019)

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.

References

  • bugzilla.mozilla.org/show_bug.cgi?id=1452075
  • cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5158

Code Behaviors & Features

Detect and mitigate CVE-2018-5158 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.10.100

Fixed versions

  • 1.10.100

Solution

Upgrade to version 1.10.100 or above.

Impact 8.8 HIGH

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

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/pdfjs-dist/CVE-2018-5158.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:43 +0000.