GitHub Advisoryadvisory · npm

GHSA-7jg2-jgv3-fmr4 Malicious PDF can inject JavaScript into PDF Viewer

HIGH Published 2022-05-14 Modified 2024-05-28 Official page ↗
Aliases
CVE-2018-5158
Ecosystem
npm
Packages
pdfjs-dist
Severity
High
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-94
Reviewed
2024-05-28

Affected packages

• npm pdfjs-dist: >= 2.0.0, < 2.0.550 → fixed in 2.0.550 • npm pdfjs-dist: < 1.10.100 → fixed in 1.10.100

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, Firefox < 60 and PDF.js < 2.0.550.

Related

Alias · CVE (1)

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

Weakness · CWE (1)

  • CWE-94 Improper Control of Generation of Code weakness

References