Vulnerability Description
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` parameter. The vulnerability has been fixed in [email protected]. As a workaround, sanitize user input before passing it to the vulnerable API members.
CVSS Score
HIGH
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Parall | Jspdf | < 4.2.1 |
Related Weaknesses (CWE)
References
- https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/Patch
- https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14bPatch
- https://github.com/parallax/jsPDF/releases/tag/v4.2.1Release Notes
- https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24MitigationVendor Advisory
FAQ
What is CVE-2026-31898?
CVE-2026-31898 is a vulnerability with a CVSS score of 8.1 (HIGH). 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 a...
How severe is CVE-2026-31898?
CVE-2026-31898 has been rated HIGH with a CVSS base score of 8.1/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-31898?
Check the references section above for vendor advisories and patch information. Affected products include: Parall Jspdf.