{"id":"CVE-2026-31898","published":"2026-03-18T03:03:43Z","modified":"2026-09-07T12:05:09Z","title":"jsPDF has a PDF Object Injection via FreeText color","vendor":"parallax","product":"jsPDF","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00739,"percentile":0.50596,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8","tags":["x_refsource_MISC"]},{"url":"https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208","tags":["x_refsource_MISC"]},{"url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.1","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-31898","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2448547","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31898.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:7110","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:7128","tags":["vendor-advisory","x_refsource_REDHAT"]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":10.12},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"parallax","affectedVersions":[{"vendor":"parallax","product":"jsPDF","versions":["< 4.2.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-03-18T14:00:36.960715Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"jspdf","vulnerableRanges":["<4.2.1"],"patched":["4.2.1"],"from":["GHSA-7x6v-j9x4-qf24"],"provenance":"source"}],"summary":{"text":"A flaw in the createAnnotation method of the jsPDF library (a JavaScript PDF generation library by Parallax) lets the color parameter of FreeText annotations be used to inject arbitrary PDF objects, such as JavaScript actions, when unsanitized input is passed to it. An attacker who can supply that input over the network with no authentication can cause malicious content to run when a victim opens or interacts with the generated PDF, which requires user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:49:41Z"},"euvd":{"id":"EUVD-2026-12753","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-25535","published":"2026-02-19","fixed":"4.2.0","kev":false},{"cve":"CVE-2026-25755","published":"2026-02-19","fixed":"4.2.0","kev":false},{"cve":"CVE-2026-25940","published":"2026-02-19","fixed":"4.2.0","kev":false,"link":{"from":"CVE-2026-25940","to":"CVE-2026-31898","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:jspdf","fromFixed":"4.2.0","toFixed":"4.2.1","daysApart":27}]}},{"cve":"CVE-2026-31898","published":"2026-03-18","fixed":"4.2.1","kev":false},{"cve":"CVE-2026-31938","published":"2026-03-18","fixed":"4.2.1","kev":false}],"package":"npm:jspdf"}}