jsPDF has PDF Object Injection via Unsanitized Input in addJS Method

Summary

CVECVE-2026-25755
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-02-19 15:16:12 UTC
Updated2026-07-20 12:18:18 UTC
DescriptionjsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in [email protected]. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the `addJS` method.

Risk And Classification

Primary CVSS: v3.1 8.8 HIGH from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

EPSS: 0.008170000 probability, percentile 0.531200000 (date 2026-07-20)

Problem Types: CWE-94 | CWE-116 | CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection') | CWE-116 CWE-116: Improper Encoding or Escaping of Output | CWE-94 Improper Control of Generation of Code ('Code Injection')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3.1ADPCVSS9.6CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
3.1[email protected]Secondary8.1HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
3.10b0ca135-0b70-47e7-9f44-1890c2a1c46cSecondary9.6CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
3.1CNADECLARED8.1HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Parall Jspdf All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Parallax JsPDF affected < 4.2.0 Not specified
ADP Red Hat Red Hat Advanced Cluster Security 4.8 unaffected 1775594119 * rpm Not specified
ADP Red Hat Red Hat Advanced Cluster Security 4.9 unaffected 1775594284 * rpm Not specified

References

ReferenceSourceLinkTags
github.com/parallax/jsPDF/security/advisories/GHSA-9vjf-qc39-jprp [email protected] github.com Vendor Advisory
github.com/parallax/jsPDF/releases/tag/v4.2.0 [email protected] github.com Release Notes
access.redhat.com/security/cve/CVE-2026-25755 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md [email protected] github.com Exploit, Mitigation, Third Party Advisory
github.com/parallax/jsPDF/commit/56b46d45b052346f5995b005a34af5dcdddd5437 [email protected] github.com Patch
bugzilla.redhat.com/show_bug.cgi 0b0ca135-0b70-47e7-9f44-1890c2a1c46c bugzilla.redhat.com
access.redhat.com/errata/RHSA-2026:7110 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
access.redhat.com/errata/RHSA-2026:7128 0b0ca135-0b70-47e7-9f44-1890c2a1c46c access.redhat.com
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25755.json 0b0ca135-0b70-47e7-9f44-1890c2a1c46c security.access.redhat.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

SourceTimeEvent
ADP2026-02-19T15:01:21.761ZReported to Red Hat.
ADP2026-02-19T14:41:46.941ZMade public.

Solutions

ADP: RHSA-2026:7110: Red Hat Advanced Cluster Security 4.8

ADP: RHSA-2026:7128: Red Hat Advanced Cluster Security 4.9

Workarounds

ADP: To mitigate this vulnerability, sanitize the user-provided JavaScript code before passing it to the addJS method by strictly escaping backslashes and parentheses. Additionally, do not open PDF documents from untrusted sources.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report