{"cve":"CVE-2026-31898","nvd":{"published":"2026-03-18T04:17:21.050","modified":"2026-08-18T12:18:06.210","status":"Modified","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 jsPDF@4.2.1. As a workaround, sanitize user input before passing it to the vulnerable API members.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5},"cwes":["CWE-116","CWE-94"],"references":["https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208","https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8","https://github.com/parallax/jsPDF/releases/tag/v4.2.1","https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24","https://access.redhat.com/errata/RHSA-2026:7110"],"products":["parall:jspdf"],"source":"nvd","synced_at":"2026-10-19T22:26:19.218427112+00:00"},"epss":{"cve":"CVE-2026-31898","score":0.0037,"percentile":0.30931,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-7x6v-j9x4-qf24","url":"https://osv.dev/vulnerability/GHSA-7x6v-j9x4-qf24","summary":"jsPDF has a PDF Object Injection via FreeText color","modified":"2026-09-10T03:50:38.039654888Z","packages":[{"ecosystem":"npm","name":"jspdf","purl":"pkg:npm/jspdf","ranges":["<4.2.1"],"fixed":["4.2.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}