CVE-2018-5158
published 2018-06-11CVE-2018-5158: The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file. This…
PriorityP345high8.8CVSS 3.0
AVNACLPRNUIRSUCHIHAH
EPSS
10.58%
95.3th percentile
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.
Affected
30 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | firefox | < firefox 60.0-1 (sid) | firefox 60.0-1 (sid) |
| debian | firefox-esr | < firefox 60.0-1 (sid) | firefox 60.0-1 (sid) |
| debian | gitlab | < firefox 60.0-1 (sid) | firefox 60.0-1 (sid) |
| mozilla | firefox | < 52.8.0 | 52.8.0 |
| mozilla | firefox | < 60.0 | 60.0 |
| mozilla | firefox | >= 0 < 60.0+build2-0ubuntu0.14.04.1 | 60.0+build2-0ubuntu0.14.04.1 |
| mozilla | firefox | >= 0 < 60.0.1+build2-0ubuntu0.14.04.1 | 60.0.1+build2-0ubuntu0.14.04.1 |
| mozilla | firefox | >= 0 < 60.0+build2-0ubuntu0.16.04.1 | 60.0+build2-0ubuntu0.16.04.1 |
| mozilla | firefox | >= 0 < 60.0.1+build2-0ubuntu0.16.04.1 | 60.0.1+build2-0ubuntu0.16.04.1 |
| mozilla | firefox | >= 0 < 60.0+build2-0ubuntu1 | 60.0+build2-0ubuntu1 |
| mozilla | firefox | >= 0 < 60.0.1+build2-0ubuntu0.18.04.1 | 60.0.1+build2-0ubuntu0.18.04.1 |
| mozilla | firefox | >= unspecified < 60 | 60 |
| mozilla | firefox_esr | >= unspecified < 52.8 | 52.8 |
| redhat | enterprise_linux_desktop | — | — |
| redhat | enterprise_linux_desktop | — | — |
| redhat | enterprise_linux_server | — | — |
| redhat | enterprise_linux_server | — | — |
| redhat | enterprise_linux_server_aus | — | — |
CVSS provenance
nvdv3.08.8HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.06.8MEDIUMAV:N/AC:M/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_ubuntu9.8CRITICAL
vendor_debian8.8HIGH
vendor_oracle8.8HIGH
vendor_redhat8.8HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Oracle
Oracle Oracle Siebel CRM Risk Matrix: eDetailing (PDF Viewer) — CVE-2018-5158
vendor_oracle·2022-10-15·CVSS 8.8
CVE-2018-5158 [HIGH] Oracle Oracle Siebel CRM Risk Matrix: eDetailing (PDF Viewer) — CVE-2018-5158
Oracle Oracle Siebel CRM Risk Matrix: eDetailing (PDF Viewer) vulnerability
CVE: CVE-2018-5158
CVSS: 8.8
Protocol: HTTP
Remote exploit: Yes
Affected versions: Network
Advisory: cpuoct2022 (OCT 2022)
Ubuntu
Firefox regression
vendor_ubuntu·2018-05-18·CVSS 9.8
[CRITICAL] Firefox regression
Title: Firefox regression
Summary: USN-3645-1 caused a regression in Firefox.
USN-3645-1 fixed vulnerabilities in Firefox. The update caused an issue
where users experienced long UI pauses in some circumsances. This update
fixes the problem.
We apologize for the inconvenience.
Original advisory details:
Multiple security issues were discovered in Firefox. If a user were
tricked in to opening a specially crafted website, an attacker could
potentially exploit these to cause a denial of service via application
crash, bypass same-origin restrictions, conduct cross-site scripting (XSS)
attacks, install lightweight themes without user interaction, spoof the
filename in the downloads panel, or execute arbitrary code.
(CVE-2018-5150, CVE-2018-5151, CVE-2018-5153, CVE-2018-5154,
CVE-2018-5155,
Ubuntu
Firefox vulnerabilities
vendor_ubuntu·2018-05-11·CVSS 9.8
CVE-2018-5150 [CRITICAL] Firefox vulnerabilities
Title: Firefox vulnerabilities
Summary: Firefox could be made to crash or run programs as your login if it
opened a malicious website.
Multiple security issues were discovered in Firefox. If a user were
tricked in to opening a specially crafted website, an attacker could
potentially exploit these to cause a denial of service via application
crash, bypass same-origin restrictions, conduct cross-site scripting (XSS)
attacks, install lightweight themes without user interaction, spoof the
filename in the downloads panel, or execute arbitrary code.
(CVE-2018-5150, CVE-2018-5151, CVE-2018-5153, CVE-2018-5154,
CVE-2018-5155, CVE-2018-5157, CVE-2018-5158, CVE-2018-5159, CVE-2018-5160,
CVE-2018-5163, CVE-2018-5164, CVE-2018-5168, CVE-2018-5173, CVE-2018-5175,
CVE-2018-5177, CVE-2018-5180)
Multip
Red Hat
Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
vendor_redhat·2018-05-09·CVSS 8.8
CVE-2018-5158 [HIGH] CWE-95 Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
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.
Package: thunderbird (Red Hat Enterprise Linux 6) - Not affected
Package: thunderbird (Red Hat Enterprise Linux 7) - Not affected
Package: firefox (Red Hat Enterprise Linux 8) - Not affected
Debian
CVE-2018-5158: firefox - The PDF viewer does not sufficiently sanitize PostScript calculator functions, a...
vendor_debian·2018·CVSS 8.8
CVE-2018-5158 [HIGH] CVE-2018-5158: firefox - The PDF viewer does not sufficiently sanitize PostScript calculator functions, a...
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.
Scope: local
sid: resolved (fixed in 60.0-1)
GHSA
Malicious PDF can inject JavaScript into PDF Viewer
ghsa·2022-05-14
CVE-2018-5158 [HIGH] CWE-94 Malicious PDF can inject JavaScript into PDF Viewer
Malicious PDF can inject JavaScript into PDF Viewer
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.
OSV
Malicious PDF can inject JavaScript into PDF Viewer
osv·2022-05-14
CVE-2018-5158 [HIGH] Malicious PDF can inject JavaScript into PDF Viewer
Malicious PDF can inject JavaScript into PDF Viewer
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.
OSV
CVE-2018-5158: The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file
osv·2018-06-11·CVSS 8.8
CVE-2018-5158 [HIGH] CVE-2018-5158: The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file
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.
OSV
firefox regression
osv·2018-05-18·CVSS 9.8
[CRITICAL] firefox regression
firefox regression
USN-3645-1 fixed vulnerabilities in Firefox. The update caused an issue
where users experienced long UI pauses in some circumsances. This update
fixes the problem.
We apologize for the inconvenience.
Original advisory details:
Multiple security issues were discovered in Firefox. If a user were
tricked in to opening a specially crafted website, an attacker could
potentially exploit these to cause a denial of service via application
crash, bypass same-origin restrictions, conduct cross-site scripting (XSS)
attacks, install lightweight themes without user interaction, spoof the
filename in the downloads panel, or execute arbitrary code.
(CVE-2018-5150, CVE-2018-5151, CVE-2018-5153, CVE-2018-5154,
CVE-2018-5155, CVE-2018-5157, CVE-2018-5158, CVE-2018-5159, CVE-2018-5160,
OSV
firefox vulnerabilities
osv·2018-05-11·CVSS 9.8
CVE-2018-5150 [CRITICAL] firefox vulnerabilities
firefox vulnerabilities
Multiple security issues were discovered in Firefox. If a user were
tricked in to opening a specially crafted website, an attacker could
potentially exploit these to cause a denial of service via application
crash, bypass same-origin restrictions, conduct cross-site scripting (XSS)
attacks, install lightweight themes without user interaction, spoof the
filename in the downloads panel, or execute arbitrary code.
(CVE-2018-5150, CVE-2018-5151, CVE-2018-5153, CVE-2018-5154,
CVE-2018-5155, CVE-2018-5157, CVE-2018-5158, CVE-2018-5159, CVE-2018-5160,
CVE-2018-5163, CVE-2018-5164, CVE-2018-5168, CVE-2018-5173, CVE-2018-5175,
CVE-2018-5177, CVE-2018-5180)
Multiple security issues were discovered with WebExtensions. If a user
were tricked in to installing a specially craft
No detection rules found.
No public exploits indexed.
Bugzilla
Arbitrary Javascript injection in PDF.js through FontMatrix
bugzilla·2024-04-26
Arbitrary Javascript injection in PDF.js through FontMatrix
Arbitrary Javascript injection in PDF.js through FontMatrix
Created attachment 9398837
js_injection_poc.pdf
(Tested with Firefox 124.0b9 on Ubuntu and with PDF.js latest from Git.)
Arbitrary Javascript code can be executed in the PDF.js context (unrelated to the Javascript sandbox) by abusing a lack of type checking in the glyph path compilation process, specifically when a Type 1 font is involved. A prerequisite is that `isEvalSupported` needs to be true (it is by default).
This results in a somewhat universal XSS when a PDF is opened with Firefox (cross-origin restrictions are still in place). An attacker can control the PDF.js window and do things like spy on the user’s activity, trigger downloads using `pdf.js.message` events (even file:// URLs can be “downloaded” in this way) or l
HackerOne
XSS in PDF Viewer
hackerone·2020-05-23·CVSS 8.8
CVE-2018-5158 [HIGH] XSS in PDF Viewer
XSS in PDF Viewer
An outdated version of PDF.js in use allows for the CVE-2018-5158 vulnerability.
When the payload PDF is shown in the supplied PDF viewer, it can execute arbitrary JavaScript.
I have tested the payload PDF, and it is working in the Safari 13.0.5 (the latest version) and Firefox 74.0 (the latest version). Although, it does not work in the latest version of Chrome.
I could not find a way to test it on the desktop client. I assume that it would use the system PDF viewer.
Modifying the payload to fetch other code was luckily blocked because of a CORS policy.
The payload is from [https://bugzilla.mozilla.org/show_bug.cgi?id=1452075](https://bugzilla.mozilla.org/show_bug.cgi?id=1452075).
I have also included the PDF in the attachments.
The payload can be seen in action b
Bugzilla
CVE-2018-5158 Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
bugzilla·2018-05-09·CVSS 8.8
CVE-2018-5158 [HIGH] CVE-2018-5158 Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
CVE-2018-5158 Mozilla: Malicious PDF can inject JavaScript into PDF Viewer
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.
External Reference:
https://www.mozilla.org/en-US/security/advisories/mfsa2018-12/#CVE-2018-5158
Discussion:
Acknowledgments:
Name: the Mozilla project
Upstream: Wladimir Palant
---
This issue has been addressed in the following products:
Red Hat Enterprise Linux 6
Via RHSA-2018:1414 https://access.redhat.com/errata/RHSA-2018:1414
---
This issue has been addressed in the following products:
Red Hat Enterprise Linux 7
Via RHSA-2018:1415 https://access.redhat.com/errata
http://www.securityfocus.com/bid/104136http://www.securitytracker.com/id/1040896https://access.redhat.com/errata/RHSA-2018:1414https://access.redhat.com/errata/RHSA-2018:1415https://bugzilla.mozilla.org/show_bug.cgi?id=1452075https://lists.debian.org/debian-lts-announce/2018/05/msg00007.htmlhttps://security.gentoo.org/glsa/201810-01https://usn.ubuntu.com/3645-1/https://www.debian.org/security/2018/dsa-4199https://www.mozilla.org/security/advisories/mfsa2018-11/https://www.mozilla.org/security/advisories/mfsa2018-12/http://www.securityfocus.com/bid/104136http://www.securitytracker.com/id/1040896https://access.redhat.com/errata/RHSA-2018:1414https://access.redhat.com/errata/RHSA-2018:1415https://bugzilla.mozilla.org/show_bug.cgi?id=1452075https://lists.debian.org/debian-lts-announce/2018/05/msg00007.htmlhttps://security.gentoo.org/glsa/201810-01https://usn.ubuntu.com/3645-1/https://www.debian.org/security/2018/dsa-4199https://www.mozilla.org/security/advisories/mfsa2018-11/https://www.mozilla.org/security/advisories/mfsa2018-12/
2018-06-11
Published