fix(deps): update dependency jspdf to v4 [security]#1334
fix(deps): update dependency jspdf to v4 [security]#1334renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1334 +/- ##
=======================================
Coverage 18.35% 18.35%
=======================================
Files 454 454
Lines 74865 74865
Branches 1594 1599 +5
=======================================
+ Hits 13743 13744 +1
+ Misses 61122 61121 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright test resultsDetails
Failed testsfirefox-setup › auth.setup.ts › authenticate as user - Skipped testsfirefox › pages/myOrganization.test.ts › MyOrganization › Invitation Management: should display all required elements - |
67acdd6 to
030b595
Compare
3e7f371 to
0131aa9
Compare
3167b90 to
3327c92
Compare
b2dadef to
c222e52
Compare
d23d9a3 to
9ca1dd9
Compare
aaf50b5 to
adcbb45
Compare
75117d1 to
2202f2b
Compare
cc23619 to
1f1574b
Compare
571417d to
91d9fa0
Compare
75d5bd2 to
e89d0cc
Compare
c6f4ba6 to
470f313
Compare
9eb7dfa to
69c7949
Compare
4709962 to
209e9a3
Compare
a700d4c to
21e95c7
Compare
f557b64 to
2389905
Compare
2389905 to
d472133
Compare
d472133 to
bcc4bbc
Compare
bcc4bbc to
de9ed42
Compare
de9ed42 to
e45e627
Compare
e45e627 to
3e79e1c
Compare
3e79e1c to
ca5333b
Compare
bd3c75f to
632f8b4
Compare
This PR contains the following updates:
^2.5.1→^4.0.0GitHub Vulnerability Alerts
CVE-2025-29907
Impact
User control of the first argument of the
addImagemethod results in CPU utilization and denial of service.If given the possibility to pass unsanitized image urls to the
addImagemethod, a user can provide a harmful data-url that results in high CPU utilization and denial of service.Other affected methods are:
html,addSvgAsImage.Example payload:
Patches
The vulnerability was fixed in jsPDF 3.0.1. Upgrade to jspdf@>=3.0.1
Workarounds
Sanitize image urls before passing it to the
addImagemethod or one of the other affected methods.Credits
Researcher: Aleksey Solovev (Positive Technologies)
CVE-2025-57810
Impact
User control of the first argument of the addImage method results in CPU utilization and denial of service.
If given the possibility to pass unsanitized image data or URLs to the addImage method, a user can provide a harmful PNG file that results in high CPU utilization and denial of service.
Other affected methods are:
html.Example payload:
Patches
The vulnerability was fixed in jsPDF 3.0.2. Upgrade to jspdf@>=3.0.2.
In jspdf@>=3.0.2, invalid PNG files throw an Error instead of causing very long running loops.
Workarounds
Sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
Credits
Researcher: Aleksey Solovev (Positive Technologies)
CVE-2025-68428
Impact
User control of the first argument of the loadFile method in the node.js build allows local file inclusion/path traversal.
If given the possibility to pass unsanitized paths to the loadFile method, a user can retrieve file contents of arbitrary files in the local file system the node process is running in. The file contents are included verbatim in the generated PDFs.
Other affected methods are:
addImage,html,addFont.Only the node.js builds of the library are affected, namely the
dist/jspdf.node.jsanddist/jspdf.node.min.jsfiles.Example attack vector:
Patches
The vulnerability has been fixed in jsPDF@4.0.0. This version restricts file system access per default. This semver-major update does not introduce other breaking changes.
Workarounds
With recent node versions, jsPDF recommends using the
--permissionflag in production. The feature was introduced experimentally in v20.0.0 and is stable since v22.13.0/v23.5.0/v24.0.0. See the node documentation for details.For older node versions, sanitize user-provided paths before passing them to jsPDF.
Credits
Researcher: kilkat (Kwangwoon Kim)
CVE-2026-24040
Impact
The addJS method in the jspdf Node.js build utilizes a shared module-scoped variable (text) to store JavaScript content. When used in a concurrent environment (e.g., a Node.js web server), this variable is shared across all requests.
If multiple requests generate PDFs simultaneously, the JavaScript content intended for one user may be overwritten by a subsequent request before the document is generated. This results in Cross-User Data Leakage, where the PDF generated for User A contains the JavaScript payload (and any embedded sensitive data) intended for User B.
Typically, this only affects server-side environments, although the same race conditions might occur if jsPDF runs client-side.
Patches
The vulnerability has been fixed in jspdf@4.0.1. The fix moves the shared variable into the function scope, ensuring isolation between instances.
Workarounds
Avoid using the addJS method in concurrent server-side environments. If usage is required, ensure requests are processed sequentially (e.g., using a queue) rather than in parallel.
CVE-2026-24043
Impact
User control of the first argument of the
addMetadatafunction allows users to inject arbitrary XML.If given the possibility to pass unsanitized input to the
addMetadatamethod, a user can inject arbitrary XMP metadata into the generated PDF. If the generated PDF is signed, stored or otherwise processed after, the integrity of the PDF can no longer be guaranteed.Example attack vector:
Patches
The vulnerability has been fixed in jsPDF@4.1.0
Workarounds
Sanitize user input before passing it to the
addMetadatamethod: escape XML entities. For example:CVE-2026-24133
Impact
User control of the first argument of the
addImagemethod results in Denial of Service.If given the possibility to pass unsanitized image data or URLs to the
addImagemethod, a user can provide a harmful BMP file that results in out of memory errors and denial of service. Harmful BMP files have large width and/or height entries in their headers, wich lead to excessive memory allocation.Other affected methods are:
html.Example attack vector:
Patches
The vulnerability has been fixed in jsPDF 4.1.0. Upgrade to jspdf@>=4.1.0.
Workarounds
Sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
CVE-2026-24737
Impact
User control of properties and methods of the Acroform module allows users to inject arbitrary PDF objects, such as JavaScript actions.
If given the possibility to pass unsanitized input to one of the following methods or properties, a user can inject arbitrary PDF objects, such as JavaScript actions, which are executed when the victim opens the document. The vulnerable API members are:
AcroformChoiceField.addOptionAcroformChoiceField.setOptionsAcroFormCheckBox.appearanceStateAcroFormRadioButton.appearanceStateExample attack vector:
Patches
The vulnerability has been fixed in jsPDF@4.1.0.
Workarounds
Sanitize user input before passing it to the vulnerable API members.
Credits
Research and fix: Ahmet Artuç
CVE-2026-25535
Impact
User control of the first argument of the
addImagemethod results in denial of service.If given the possibility to pass unsanitized image data or URLs to the
addImagemethod, a user can provide a harmful GIF file that results in out of memory errors and denial of service. Harmful GIF files have large width and/or height entries in their headers, wich lead to excessive memory allocation.Other affected methods are:
html.Example attack vector:
Patches
The vulnerability has been fixed in jsPDF 4.1.1. Upgrade to jspdf@>=4.2.0.
Workarounds
Sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
References
https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25535.md
CVE-2026-25940
Impact
User control of properties and methods of the Acroform module allows users to inject arbitrary PDF objects, such as JavaScript actions.
If given the possibility to pass unsanitized input to one of the following property, a user can inject arbitrary PDF objects, such as JavaScript actions, which are executed when the victim hovers over the radio option.
AcroformChildClass.appearanceStateExample attack vector:
Patches
The vulnerability has been fixed in jsPDF@4.2.0.
Workarounds
Sanitize user input before passing it to the vulnerable API members.
CVE-2026-25755
Impact
User control of the argument of the
addJSmethod 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.Patches
The vulnerability has been fixed in jspdf@4.2.0.
Workarounds
Escape parentheses in user-provided JavaScript code before passing them to the
addJSmethod.References
https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md
Release Notes
parallax/jsPDF (jspdf)
v4.2.0Compare Source
This release fixes three security issues.
What's Changed
New Contributors
Full Changelog: parallax/jsPDF@v4.1.0...v4.2.0
v4.1.0Compare Source
This release fixes several security issues.
What's Changed
Full Changelog: parallax/jsPDF@v4.0.0...v4.1.0
v4.0.0Compare Source
This release fixes a critical path traversal/local file inclusion security vulnerability in the jsPDF Node.js build. File system access is now restricted by default and can be enabled by either using node's
--permissionflag or the newjsPDF.allowFsReadproperty.There are no other breaking changes.
v3.0.4Compare Source
This release includes a bunch of bugfixes. Thanks to all contributors!
What's Changed
New Contributors
Full Changelog: parallax/jsPDF@v3.0.3...v3.1.0
v3.0.3Compare Source
This release fixes regressions with PNG encoding that were introduced in v3.0.2.
What's Changed
New Contributors
Full Changelog: parallax/jsPDF@v3.0.2...v3.0.3
v3.0.2Compare Source
This release fixes a security issue where parsing of corrupt PNG images could lead to long running loops and denial of service.
What's Changed
New Contributors
Full Changelog: parallax/jsPDF@v3.0.1...v3.0.2
v3.0.1Compare Source
This release fixes two security vulnerabilities:
addImagemethod and the methodshtmlandaddSvgAsImage, which depend onaddImagev3.0.0Compare Source
This major release officially drops support for Internet Explorer and fixes a security vulnerability in the
htmlfunction by updating the optional dependencydompurifyto v3.2.4. There are no other breaking changes.New Contributors
Full Changelog: parallax/jsPDF@v2.5.2...v3.0.0
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.