PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
Transitive dependency pdfjs-dist 2.16.105 is introduced via
- @forge/react 11.1.0 … pdfjs-dist 2.16.105
Package | Affected versions | Patched version |
---|---|---|
pdfjs-dist (npm) |
<= 4.1.392 |
4.2.67 |
Impact
If pdf.js is used to load a malicious PDF, and PDF.js is configured with isEvalSupported
set to true
(which is the default value), unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.
Patches
The patch removes the use of eval
:
mozilla/pdf.js#18015
Workarounds
Set the option isEvalSupported
to false
.
References
Above is a message reported by Dependabot which results in a High
security vulnerability issue which is being flagged by my companies security team as something that requires resolution.
Please update the @forge/react
project to have pdfjs-dist@4.2.67