CVE-2018-5158
Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
Severity
ImportantRed Hat Product Security
CVSS 3.0
Review impact separately from score.
Published · May 9, 2018
Updated · November 26, 2025
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.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.0 · 8.8CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-95 · Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')