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.
This patch forces isEvalSupported
to false
, removing the attack vector.
Set options.isEvalSupported
to false
, where options
is Document
component prop.