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

Ransomware

The critical unsafe deserialization flaw allows attackers to execute arbitrary code remotely, without authentication.

ICS/OT

A researcher has explained how an attacker could exploit these vulnerabilities to target industrial organizations.

Artificial Intelligence

AgentForger allows an attacker to create, insert and remotely control an invisible autonomous AI agent inside a victim organization.

Vulnerabilities

The vulnerability tracked as CVE-2026-16232 has been exploited against customers with certain configurations.

Vulnerabilities

An attacker only needed to convince the targeted user to visit a malicious website to exfiltrate WhatsApp messages and contacts.

Vulnerabilities

CVE-2026-50522 is being exploited by threat actors to steal machine keys and retain long-term access.

Vulnerabilities

Many of the vulnerabilities fixed with the July 2026 Critical Patch Update were likely discovered by AI.

Artificial Intelligence

The open-weight Antares models are designed to pinpoint known vulnerabilities in codebases faster and at a fraction of the cost of larger AI models.

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

Exit mobile version