CVE-2026-31898: jsPDF is a library to generate PDFs in JavaScript
CVE-2026-31898 is a high-severity flaw (CVSS 8.1) affecting jspdf. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the `createAnnotation` 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 `createAnnotation`: `color` par
Why this priority
- High severity
A fixed release or distro patch exists.
Last updated 2026-08-18 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-31898?
jspdf: upgrade to 4.2.1. Exact commands for each OS are on this page.
Is CVE-2026-31898 being exploited?
CVE-2026-31898 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-31898 affect?
CVE-2026-31898 affects jspdf. Severity is high (CVSS 8.1). jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the `createAnnotation` method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass
How urgent is CVE-2026-31898?
Priority 36/100. High severity
Related CVEs
- CVE-2025-68428 HIGH 7.5 UPGRADE jsPDF is a library to generate PDFs in JavaScript
- CVE-2026-31938 CRITICAL 9.6 UPGRADE jsPDF is a library to generate PDFs in JavaScript
- CVE-2026-24737 HIGH 8.1 UPGRADE jsPDF is a library to generate PDFs in JavaScript
- CVE-2026-24133 MEDIUM 6.5 UPGRADE jsPDF is a library to generate PDFs in JavaScript
- CVE-2026-24043 MEDIUM 5.4 UPGRADE jsPDF is a library to generate PDFs in JavaScript