Lucene search

K
githubGitHub Advisory DatabaseGHSA-87HQ-Q4GP-9WR4
HistoryMay 07, 2024 - 4:48 p.m.

react-pdf vulnerable to arbitrary JavaScript execution upon opening a malicious PDF with PDF.js

2024-05-0716:48:59
CWE-79
GitHub Advisory Database
github.com
17
pdf.js
vulnerability
arbitrary javascript

7.1 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L

0.0004 Low

EPSS

Percentile

10.5%

Summary

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

This patch forces isEvalSupported to false, removing the attack vector.

Workarounds

Set options.isEvalSupported to false, where options is Document component prop.

References

Affected configurations

Vulners
Node
reactpdfRange<8.0.2
OR
reactpdfRange<7.7.3
CPENameOperatorVersion
react-pdflt8.0.2
react-pdflt7.7.3

7.1 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L

0.0004 Low

EPSS

Percentile

10.5%

Related for GHSA-87HQ-Q4GP-9WR4