Skip to main content
VulnerabilityPublished Updated

CVE-2026-31938: parallax jsPDF · Cross-site Scripting

Affects parallax jsPDFSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 9.6 Critical : upgrade to 4.2.1 as a priority.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
9.6Critical
How severe the flaw is on the 0–10 CVSS scale.

Contested

Critical score, yet low EPSS after six months
EPSS
0.2% chance of exploitation in 30 days – higher than 19% 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:C/C:H/I:H/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 18 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 30 Oct 2026.

What to do

Upgrade jsPDF and jspdf to 4.2.1.

Affected software

ProductAffectedFixed in
parallaxjsPDFAffected
  • <4.2.1
Fixed in
  • 4.2.1
npmjspdfpkg:npm/jspdfOther threatsAffected
  • <4.2.1
Fixed in
  • 4.2.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in jsPDF version 4.2.1. Users should upgrade to this version to remediate the vulnerability. As a workaround, sanitize all user-supplied input passed to the output function's options argument to prevent injection of malicious HTML or scripts. Red Hat notes that no other mitigation currently meets their criteria for ease of use and applicability. Therefore, upgrading is the recommended remediation.

Description

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of the `options` argument of the `output` function allows attackers to inject arbitrary HTML (such as scripts) into the browser context the created PDF is opened in. The vulnerability can be exploited in the following scenario: the attacker provides values for the output options, for example via a web interface. These values are then passed unsanitized (automatically or semi-automatically) to the attack victim. The victim creates and opens a PDF with the attack vector using one of the vulnerable method overloads inside their browser. The attacker can thus inject scripts that run in the victims browser context and can extract or modify secrets from this context. The vulnerability has been fixed in jspdf@4.2.1. As a workaround, sanitize user input before passing it to the output method.

References

Community reviews

Loading reviews…