A critical vulnerability has been discovered in PDF.js, a widely-used open-source library that allows browsers to render PDF files without external plugins. This vulnerability, also affecting React-PDF, could enable threat actors to execute arbitrary code by tricking users into opening malicious PDF files. Since PDF.js is integrated into popular browsers like Mozilla Firefox, Google Chrome, Safari, and Edge, the potential impact is extensive, putting millions of users at risk.
The vulnerabilities, identified as CVE-2024-34342 and CVE-2024-4367, have varying degrees of severity. CVE-2024-34342 is related to React-PDF and can be exploited when PDF.js is configured with isEvalSupported set to true, allowing JavaScript execution within the hosting domain. This vulnerability has a high severity rating of 7.1. React-PDF has addressed this issue by setting isEvalSupported to false by default. CVE-2024-4367 affects the core Mozilla PDF.js library and can be exploited to execute arbitrary code with the same permissions as the logged-on user, potentially allowing attackers to install programs, alter data, or create new accounts with full user rights.
The vulnerabilities were disclosed at the OffensiveCon conference in Berlin on May 11, and patches have already been released by Wojciech Maj, the maintainer of the React-PDF project. Users are strongly advised to update their PDF.js and React-PDF implementations to the latest versions to mitigate these risks. Keeping software up-to-date is crucial in preventing exploitation by threat actors.
Given the widespread use of PDF.js in various browsers and applications, this security flaw underscores the importance of regular software updates and vigilant cybersecurity practices. Users and organizations should ensure their systems are protected by applying the necessary patches promptly. Staying informed about security vulnerabilities and taking proactive measures is essential in safeguarding against potential cyber threats.