CVE-2026-31898: parallax jsPDF · Improper Encoding or Escaping of Output
Affects parallax jsPDFSource CVE Database V5
Not known to be exploited · CVSS 8.1 High : upgrade to 4.2.1 soon.
Data as of 30 Oct 2026, 11:34 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 30% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 4.2.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 18 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Oct 2026.
What to do
Upgrade jsPDF and jspdf to 4.2.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| parallaxjsPDF | Affected
| Fixed in
|
npmjspdfpkg:npm/jspdfOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to jsPDF version 4.2.1 or later, which contains the official fix for this vulnerability. As a workaround, sanitize all user input before passing it to the createAnnotation method, especially the color parameter. Vendor advisories indicate that other mitigations do not meet criteria for broad applicability or stability, so upgrading is strongly recommended.
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.
References
- github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24 (opens in a new tab)
- github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8 (opens in a new tab)
- github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js (opens in a new tab)
- github.com/parallax/jsPDF/releases/tag/v4.2.1 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-31898 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2448547 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31898.json (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7110 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:7128 (opens in a new tab)