Intel

AIKIDO-2024-10243

ng2-pdfjs-viewer is vulnerable to Cross-site Scripting (XSS)

Cross-site Scripting (XSS)CVE-2024-4367

80

High Risk

This Affects:

Are you affected? Scan for Free

TL;DR

All versions of this package are vulnerable to CVE-2024-4367 due to the use of a vulnerable version of pdf.js, which permits arbitrary JavaScript execution through Cross-site Scripting (xss).

Who does this affect?

You are affected if you use this package.

Background info

ng2-pdfjs-viewer is vulnerable to Cross-site Scripting (XSS) in all versions.

How to fix this

Since no fix is available for this package, you can mitigate the vulnerability by forking the library and setting the isEvalSupported property in the pdf.js configuration to false. Alternatively, you can use pdf.js directly by leveraging the https://www.npmjs.com/package/pdfjs-dist package.