Vulnerabilities

Critical Vulnerability Patched in jsPDF

The bug can allow attackers to read arbitrary files from the system, potentially exposing configurations and credentials.

Development software vulnerability

A critical-severity vulnerability recently patched in the jsPDF library could allow attackers to read sensitive information, including configuration files and credentials, Endor Labs warns.

A popular NPM package with more than 3.5 million downloads per week, jsPDF supports the creation of PDF documents in JavaScript applications.

The flaw, tracked as CVE-2025-68428 (CVSS score of 9.2), is a local file inclusion/path traversal issue in the library’s loadFile method.

Because user-controlled input is passed as a file path argument, jsPDF reads the specified file and includes its content in the PDF output.

“If given the possibility to pass unsanitized paths to the loadFile method, a user can retrieve file contents of arbitrary files in the local file system the node process is running in. The file contents are included verbatim in the generated PDFs,” jsPDF’s maintainers explain in an advisory.

Public-facing methods that internally call loadFile and could be abused as attack vectors include addImage, html, and addFont.

Advertisement. Scroll to continue reading.

Only the Node.js builds of jsPDF are impacted by the flaw, which was addressed in jsPDF version 4.0.0 by restricting file access by default.

According to Endor Labs, an attacker could exploit the vulnerability to disclose configuration files, credentials, environment variables, and the contents of any other file that the Node.js process can access.

“The library reads whatever file path is provided and embeds the raw content. Path traversal sequences allow reading files outside the intended directory scope. This becomes externally exploitable when a user-controlled value is passed to the first parameter within the impacted methods,” Endor Labs says.

To resolve the vulnerability, users should update to jsPDF version 4.0.0 and leverage Node’s permission flags to enforce access to specific files only.

“If you upgrade to jsPDF 4.0.0 but configure Node.js with broad read permissions to keep the application running, you remain vulnerable,” Endor Labs explains.

Related: Critical HPE OneView Vulnerability Exploited in Attacks

Related: Vulnerability in Totolink Range Extender Allows Device Takeover

Related: JumpCloud Remote Assist Vulnerability Can Expose Systems to Takeover

Related: Recent GeoServer Vulnerability Exploited in Attacks

Related Content

Nation-State

The Chinese-language input method editor for Windows can allow attackers to execute arbitrary code remotely.

Vulnerabilities

The vulnerabilities can allow attackers to bypass authentication and elevate their privileges to administrator.

Vulnerabilities

The flaw allows attackers to send files and execute them without authorization through an active remote session.

Vulnerabilities

The critical-severity path traversal flaw allows unauthenticated attackers to read arbitrary files from the GitLab server.

Vulnerabilities

Tracked as CVE-2026-85102 and CVE-2026-85103, the flaws could be exploited for remote code execution.

Vulnerabilities

A Russian threat actor used AI to build, test, and deploy exploits against hundreds of organizations worldwide.

Vulnerabilities

Tracked as CVE-2026-19490, the authentication bypass flaw has been exploited in the wild since at least September 3.

Vulnerabilities

Cisco and CISA have flagged exploitation of CVE-2026-20079, a vulnerability disclosed in March 2026.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version