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.
{ "nvd_published_at": "2024-05-07T15:15:09Z", "cwe_ids": [ "CWE-79" ], "severity": "HIGH", "github_reviewed": true, "github_reviewed_at": "2024-05-07T16:48:59Z" }