Findings

CVE-2026-31898

jsPDF is a library to generate PDFs in JavaScript.

Published Mar 18, 2026 · updated Aug 18, 2026 · parall jspdf

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass unsanitized input to the following method, a user can inject arbitrary PDF objects, such as JavaScript actions, which might trigger when the PDF is opened or interacted with the : parameter. The vulnerability has been fixed in jsPDF@4.2.1. As a workaround, sanitize user input before passing it to the vulnerable API members.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Mar 18, 2026 · NIST NVD

    Detected

    jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass unsanitized input to the following method, a user can inject arbitrary PDF objects, such as JavaScript actions, which might trigger when the PDF is opened or interacted with the

  2. Aug 18, 2026 · NIST NVD

    Updated

    jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass unsanitized input to the following method, a user can inject arbitrary PDF objects, such as JavaScript actions, which might trigger when the PDF is opened or interacted with the

Affected

  • cpe parall/jspdfversion unspecified

Sources

  • CVE.orgVulnerability recordCVE-2026-31898

    Official CVE identifier

    cve.org
  • NIST NVDVulnerability recordCVE-2026-31898

    jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass unsanitized input to the following meth

    nvd.nist.gov

References