Arbitrary Code Injection Affecting ngx-extended-pdf-viewer package, versions >=19.2.0 <20.0.2


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
32.13% (97th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-NGXEXTENDEDPDFVIEWER-11790310
  • published14 Aug 2025
  • disclosed7 May 2024
  • creditThomasRinsma

Introduced: 7 May 2024

CVE-2024-4367  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade ngx-extended-pdf-viewer to version 20.0.2 or higher.

Overview

ngx-extended-pdf-viewer is a powerful, full-featured PDF viewer for Angular applications. Whether you're building enterprise tools or internal utilities, this library gives you the control and customization options you need, all while preserving a native-like viewing experience.

Built on Mozilla’s pdf.js and extended with dozens of enhancements, it's ideal for serious applications that demand more than just basic PDF display.

Affected versions of this package are vulnerable to Arbitrary Code Injection in font_loader.js, which passes input to the eval() function when the default isEvalSupported option is in use. An attacker can execute code by convincing a user to open a malicious PDF file.

Workaround

This vulnerability can be avoided by setting isEvalSupported to false.

ngx-extended-pdf-viewer uses a fork of pdf.js to operate by loading code from binaries during initialization. As a result, CVE-2024-4367, which was identified in pdf.js, was inherited by ngx-extended-pdf-viewer.

CVSS Base Scores

version 3.1