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