REDHAT-BUG-2427236: Path Traversal

Published Jan 5, 2026
·
Updated

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.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.

Affected Software

1 affected component
jsPDF jsPDF<4.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade jsPDF to a version that resolves this vulnerability.

    Fixed in 4.0.0
  2. Configuration

    Before passing any user-provided path into jsPDF methods that accept paths (loadFile, addImage, html, addFont), sanitize the path to prevent local file inclusion/path traversal in the node.js builds (dist/jspdf.node.js and dist/jspdf.node.min.js).

    jsPDF node.js build (dist/jspdf.node.js / dist/jspdf.node.min.js) loadFile: sanitize user-provided paths = Use a whitelist/normalization-based sanitization for any user-supplied path before calling loadFile, addImage, html, and addFont in node builds

Event History

Jan 5, 2026
Data Sourced
via Red Hat·10:01 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2427236?

The severity of REDHAT-BUG-2427236 is classified as high, with a score of 7.

2

How do I fix REDHAT-BUG-2427236?

To fix REDHAT-BUG-2427236, upgrade the jsPDF library to version 4.0.0 or later to mitigate the local file inclusion/path traversal vulnerability.

3

What security risk does REDHAT-BUG-2427236 present?

REDHAT-BUG-2427236 presents a risk of local file inclusion/path traversal, allowing unauthorized access to potentially sensitive files.

4

Which version of jsPDF is affected by REDHAT-BUG-2427236?

Versions of jsPDF prior to 4.0.0 are affected by REDHAT-BUG-2427236.

5

What type of vulnerability is REDHAT-BUG-2427236 classified as?

REDHAT-BUG-2427236 is classified as a Path Traversal vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203