CVE-2026-25755
published high CVSS 3.1 · 8.1jsPDF has PDF Object Injection via Unsanitized Input in addJS Method
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| parallax | — | jsPDF< 4.2.0 | Affected | Not stated | GitHub_M |
| Red Hat | — | advanced-cluster-security/rhacs-main-rhel8Red Hat Advanced Cluster Security 4.8 · 1775594119 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | advanced-cluster-security/rhacs-main-rhel8Red Hat Advanced Cluster Security 4.9 · 1775594284 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
Description
jsPDF 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.
A flaw was found in jsPDF. The addJS method accepts user input without proper sanitization, allowing an attacker to inject arbitrary PDF objects into the document. A specially crafted payload that escapes the JavaScript string delimiter can execute malicious actions or alter the document structure, resulting in arbitrary code execution when a user opens a PDF with a viewer that supports embedded scripts.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 9.6 | critical | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| parallax | jsPDF | < 4.2.0 (affected) | GitHub_M · cna |
| Red Hat | Red Hat Advanced Cluster Security 4.8 | 1775594119 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Advanced Cluster Security 4.9 | 1775594284 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
Weaknesses
3- 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')
References
9- https://access.redhat.com/errata/RHSA-2026:7110
- https://access.redhat.com/errata/RHSA-2026:7128
- https://access.redhat.com/security/cve/CVE-2026-25755
- RHBZ#2440993 https://bugzilla.redhat.com/show_bug.cgi?id=2440993
- https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md
- https://github.com/parallax/jsPDF/commit/56b46d45b052346f5995b005a34af5dcdddd5437
- https://github.com/parallax/jsPDF/releases/tag/v4.2.0
- https://github.com/parallax/jsPDF/security/advisories/GHSA-9vjf-qc39-jprp
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25755.json
Provider assertions
3GitHub_M · cna
jsPDF has PDF Object Injection via Unsanitized Input in addJS Method
redhat-SADP · adp
jsPDF: PDF object injection via unsanitized input in addJS method
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 11ac203713c86269f8d646869ac57fcfa1fc8a4af7288bbf99c0310f96151b34
- Ingested
- 23 Sep 2026, 09:07:08 UTC
- Source record
- Official CVE record