CVE-2026-31898CWE-116CWE-94code-injection

CVE-2026-31898

High · published March 18, 2026

CVSS v3.1
8.1
EPSS
1%
Percentile
50.3
In the wild
Unconfirmed
What it is

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 [email protected]. As a workaround, sanitize user input before passing it to the vulnerable API members.

The record
Technical detail
CVSS v3.1
8.1 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00644 · 50.3th percentile
Weaknesses
CWE-116 · Improper Encoding or Escaping of Output; CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-03-18T08:17Z
Affected products (1)
ProductVersionsFixed in
parall/jspdf< 4.2.14.2.1
References (9)
EPSS history
Timeline
  • 18 MAR 03:03Z
    jsPDF has a PDF Object Injection via FreeText color
    cvelistv5