CVE-2026-31898

jsPDF has a PDF Object Injection via FreeText color

MEDIUM
6.5
CVSS Score
Published: March 18, 2026 at 03:03 AM UTC
Updated: August 18, 2026 at 12:18 PM UTC
2 products affected across 2 vendorsJspdfjsPDF

Using jsPDF by parallax?

Get instant alerts when new vulnerabilities affect jsPDF - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 0.4%
SSVC
No known exploit

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.2.1
Affected range stops below 4.2.1, so it looks safe — our inference, not a vendor statement
v < 4.2.1
Affected range stops below 4.2.1, so it looks safe — our inference, not a vendor statement

References (9)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24
x_refsource_MISCRelease Notes
Source: cverecord
https://github.com/parallax/jsPDF/releases/tag/v4.2.1
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:7110
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/errata/RHSA-2026:7128
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://access.redhat.com/security/cve/CVE-2026-31898
Source: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
https://bugzilla.redhat.com/show_bug.cgi?id=2448547

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-116CWE-94

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card