Lucene search

K
osvGoogleOSV:GHSA-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
Google
osv.dev
83
pdf.js
malicious pdf
javascript execution

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.4%

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

CPENameOperatorVersion
react-pdfge8.0.0
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.4%