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.
CVE-2026-31898
This medium-severity CVE scores 6.5 under NVD CVSS v3. EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- Lower severity and no public exploit yet
A fix is available — apply it.
- CVSS v3
- 6.5
- EG Score
- 6.5(low)
- EG Risk
- —
- EPSS
- 28.1%
- KEV
- Not listed
Published
March 18, 2026
Last Modified
July 20, 2026
Advisory Details (4)
Auto-updated Jul 15, 2026v4.2.1
Patch available: parallax/jsPDF v4.2.1
https://github.com/parallax/jsPDF/releases/tag/v4.2.1jsPDF/src/modules/annotations.js at b1607a9391d4cd65ea7ade25998aea8345ae1be3 · parallax/jsPDF · GitHub
https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208commit 4155c4819d5e (parallax/jsPDF)
Patch available: parallax/jsPDF v4.2.1 (contains commit 4155c4819d5e)
https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8PDF Object Injection via free text annotation color · Advisory · parallax/jsPDF · GitHub
https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24Vendor Advisories for CVE-2026-31898(2)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(2)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| redhat | advanced-cluster-security/rhacs-main-rhel8:1775594119 | 2026-04-08 | redhat |
| redhat | advanced-cluster-security/rhacs-main-rhel8:1775594284 | 2026-04-08 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(1 across 1 ecosystem)
npm(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| jspdf | — | 4.2.1 | — |
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 14× in last 7d / 38× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-22 14:08 UTCEPSS rescore
- 2026-07-22 14:08 UTCEPSS rescore
- 2026-07-21 15:24 UTCEPSS rescore
- 2026-07-21 15:24 UTCEPSS rescore
- 2026-07-20 17:08 UTCEPSS rescore
- 2026-07-20 17:08 UTCEPSS rescore
- 2026-07-19 14:31 UTCEPSS rescore
- 2026-07-19 14:31 UTCEPSS rescore
- 2026-07-19 02:29 UTCEPSS rescore
- 2026-07-18 10:04 UTCEPSS rescore
- 2026-07-18 10:04 UTCEPSS rescore
- 2026-07-18 06:59 UTCOSV refresh
- 2026-07-16 17:03 UTCEPSS rescore
- 2026-07-16 17:03 UTCEPSS rescore
- 2026-07-15 16:57 UTCEPSS rescore
- 2026-07-15 16:57 UTCEPSS rescore
- 2026-07-15 02:22 UTCNVD updateCVSS v3 → 6.5 · severity → MEDIUM
- 2026-07-15 02:00 UTCEPSS rescore
- 2026-07-15 02:00 UTCEPSS rescore
- 2026-07-15 01:21 UTCMITRE cvelistV5CVSS v3 → 8.1 · severity → HIGH
- 2026-07-13 22:30 UTCEPSS rescore
- 2026-07-13 06:13 UTCEPSS rescore
- 2026-07-13 06:13 UTCEPSS rescore
- 2026-07-12 05:46 UTCEPSS rescore
- 2026-07-11 08:27 UTCEPSS rescore
Show 13 moreShow fewer
- 2026-07-09 19:10 UTCEPSS rescore
- 2026-07-08 15:15 UTCEPSS rescore
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-05 02:30 UTCEPSS rescore
- 2026-07-04 06:31 UTCEPSS rescore
- 2026-07-01 15:06 UTCEPSS rescore
- 2026-06-30 23:22 UTCEPSS rescore
- 2026-06-30 04:38 UTCEG score recompute
- 2026-06-30 04:38 UTCVendor advisory
- 2026-06-30 04:31 UTCNVD updatefirst tracked
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
Same CWE
10 shownCWE-94
Frequently asked(5)
What is CVE-2026-31898?
When was CVE-2026-31898 disclosed?
Is CVE-2026-31898 actively exploited?
What is the CVSS score of CVE-2026-31898?
How do I remediate CVE-2026-31898?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-31898
Is Your Infrastructure Affected by CVE-2026-31898?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.