CVE-2025-68428

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.0.0, user control of the first argument of the loadFile method in the node.js build allows local file inclusion/path traversal. 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. Other affected methods are `addImage`, `html`, and `addFont`. Only the node.js builds of the library are affected, namely the `dist/jspdf.node.js` and `dist/jspdf.node.min.js` files. The vulnerability has been fixed in jsPDF@4.0.0. This version restricts file system access per default. This semver-major update does not introduce other breaking changes. Some workarounds areavailable. With recent node versions, jsPDF recommends using the `--permission` flag in production. The feature was introduced experimentally in v20.0.0 and is stable since v22.13.0/v23.5.0/v24.0.0. For older node versions, sanitize user-provided paths before passing them to jsPDF.
Configurations

Configuration 1 (hide)

cpe:2.3:a:parall:jspdf:*:*:*:*:*:node.js:*:*

History

30 Sep 2026, 22:10

Type Values Removed Values Added
Summary
  • (es) jsPDF es una biblioteca para generar PDFs en JavaScript. Antes de la versión 4.0.0, el control del usuario sobre el primer argumento del método loadFile en la compilación de node.js permite la inclusión local de ficheros/salto de ruta. Si se le da la posibilidad de pasar rutas no saneadas al método loadFile, un usuario puede recuperar el contenido de ficheros arbitrarios en el sistema de ficheros local en el que se está ejecutando el proceso de node. El contenido de los ficheros se incluye textualmente en los PDFs generados. Otros métodos afectados son 'addImage', 'html' y 'addFont'. Solo las compilaciones de node.js de la biblioteca están afectadas, concretamente los ficheros 'dist/jspdf.node.js' y 'dist/jspdf.node.min.js'. La vulnerabilidad ha sido corregida en jsPDF@4.0.0. Esta versión restringe el acceso al sistema de ficheros por defecto. Esta actualización semver-major no introduce otros cambios disruptivos. Algunas soluciones alternativas están disponibles. Con las versiones recientes de node, jsPDF recomienda usar la bandera '--permission' en producción. La característica fue introducida experimentalmente en v20.0.0 y es estable desde v22.13.0/v23.5.0/v24.0.0. Para versiones de node más antiguas, sanee las rutas proporcionadas por el usuario antes de pasarlas a jsPDF.

Information

Published : 2026-01-05 22:15

Updated : 2026-10-07 10:10


NVD link : CVE-2025-68428

Mitre link : CVE-2025-68428

CVE.ORG link : CVE-2025-68428


JSON object : View

Products Affected

parall

  • jspdf
CWE
CWE-35

Path Traversal: '.../...//'

CWE-73

External Control of File Name or Path

CWE-22

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')