react-pdf
Affected
- introduced
0, fixed7.7.3(semver)
Fixed versions
7.7.3
Fix
- Fixed version
7.7.3npm install [email protected]
Advisory
Also known as: CVE-2024-34342
react-pdf vulnerable to arbitrary JavaScript execution upon opening a malicious PDF with PDF.js
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
High Basis: The source's own band: HIGH
0, fixed 7.7.3 (semver)7.7.3
7.7.3npm install [email protected]8.0.0, fixed 8.0.2 (semver)8.0.2
8.0.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0