
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2024-34342 affects react-pdf, a popular npm package for displaying PDFs within React applications. The vulnerability was discovered by security researcher Thomas Rinsma and disclosed on May 7, 2024. When 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 can be executed in the context of the hosting domain. The vulnerability affects react-pdf versions up to 7.7.2 and from 8.0.0 to 8.0.1 (React PDF Advisory).
The vulnerability has been assigned a CVSS v3.1 base score of 7.1 (High) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L. The issue stems from the default configuration of isEvalSupported
being set to true, which allows for the execution of arbitrary JavaScript code when processing malicious PDF files. The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) (NVD).
The vulnerability has a significant impact due to react-pdf's widespread usage, with over 600,000 downloads per week from npm. When exploited, attackers can execute unrestricted JavaScript code in the context of the hosting domain, potentially leading to data theft, cookie stealing, session token compromise, and unauthorized actions on behalf of users (Security Online).
The vulnerability has been patched in react-pdf versions 7.7.3 and 8.0.2 by forcing isEvalSupported
to false
. For users unable to upgrade immediately, a workaround is available by explicitly setting the isEvalSupported
option to false
within the Document component's options prop (React PDF Commit).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."