CVE-2026-31898: parall jspdf Improper Encoding or Escaping of Output
Vulnerability summary
CVE-2026-31898 is a high (CVSS 8.1) Improper Encoding or Escaping of Output vulnerability in parall jspdf. EPSS estimates a 0.64% chance of exploitation in the next 30 days, higher than 49.9% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 18-03-2026PublishedVulnerability first disclosed.
- 07-09-2026Last modifiedVulnerability information updated.
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 metrics
5 scores · 5 sources · 1 version- OSV · WolfiEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- OSV · NpmEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated8.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- NVDNIST6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:NDiffers
EPSS trend
Probability
0.64%
Chance of exploitation in the next 30 days
Percentile
50%
Versus all other CVEs
30-day change
+0.29 pp
From 0.36% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-116Improper Encoding or Escaping of OutputThe product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
- CWE-94Improper Control of Generation of Code ('Code Injection')The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Affected systems
Chainguard50 products
- opensearch-dashboards-2-alerting-dashboards-plugin< 2.19.5-r2
- opensearch-dashboards-2-anomaly-detection-dashboards-plugin< 2.19.5-r2
- opensearch-dashboards-2-dashboards-maps< 2.19.5-r2
- opensearch-dashboards-2-dashboards-notifications< 2.19.5-r2
- opensearch-dashboards-2-dashboards-observability< 2.19.5-r2
Wolfi12 products
- opensearch-dashboards-3-alerting-dashboards-plugin< 3.5.0-r9
- opensearch-dashboards-3-anomaly-detection-dashboards-plugin< 3.5.0-r9
- opensearch-dashboards-3-dashboards-maps< 3.5.0-r9
- opensearch-dashboards-3-dashboards-notifications< 3.5.0-r9
- opensearch-dashboards-3-dashboards-observability< 3.5.0-r9
Npm1 product
- jspdf< 4.2.1
Parall1 product
- jspdf< 4.2.1
Parallax1 product
- jspdf< 4.2.1
5 vendors · 65 products
References
12 links- github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24X Refsource CONFIRMAdvisoryWEBMitigationVendor Advisory
- github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8X Refsource MISCFIXWEBPatch
Show all 12 references
- github.com/parallax/jsPDFPACKAGE