CVE-2024-34342

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

State
Published
Severity
7.1 High
Published
May 7, 2024
Updated
Aug 2, 2024
Reserved
May 2, 2024

Read the record on cve.org

Description

react-pdf displays PDFs in React apps. 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 vulnerability is fixed in 7.7.3 and 8.0.2.

Scores

CVSSScoreVectorSource
3.17.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:LGitHub_M

Weaknesses

  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

ProductVersions
react-pdfwojtekmaj
  • < 7.7.3Affected
  • >= 8.0.0, < 8.0.2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.