You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 urls to the addImage method, 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:
import{jsPDF}from"jpsdf"constdoc=newjsPDF();constpayload='data:/charset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=scharset=s\x00base64,undefined';conststartTime=performance.now()try{doc.addImage(payload,"PNG",10,40,180,180,undefined,"SLOW");}catch(err){constendTime=performance.now()console.log(`Call to doc.addImage took ${endTime-startTime} milliseconds`)}doc.save("a4.pdf");
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 addImage method or one of the other affected methods.
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:
import{jsPDF}from"jspdf"constpayload=newUint8Array([117,171,90,253,166,154,105,166,154])constdoc=newjsPDF();conststartTime=performance.now();try{doc.addImage(payload,"PNG",10,40,180,180,undefined,"SLOW");}finally{constendTime=performance.now();console.log(`Call to doc.addImage took ${endTime-startTime} milliseconds`);}
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.
Fix parsing corrupt PNG images in addImage method by @HackbrettXXX in #3880. The atob and btoa dependencies have been removed and the fast-png dependency has been added.
This major release officially drops support for Internet Explorer and fixes a security vulnerability in the html function by updating the optional dependency dompurify to v3.2.4. There are no other breaking changes.
renovatebot
changed the title
fix(deps): update dependency jspdf to v3 [security]
fix(deps): update dependency jspdf to v3 [security] - autoclosed
Mar 19, 2025
renovatebot
changed the title
fix(deps): update dependency jspdf to v3 [security] - autoclosed
fix(deps): update dependency jspdf to v3 [security]
Mar 24, 2025
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: enfants-du-spectacle@1.125.0
npm warn Found: jspdf@2.5.2
npm warn node_modules/jspdf
npm warn jspdf@"^3.0.0" from the root project
npm warn 1 more (jspdf-autotable)
npm warn
npm warn Could not resolve dependency:
npm warn peer jspdf@"^2.5.1" from jspdf-autotable@3.8.4
npm warn node_modules/jspdf-autotable
npm warn jspdf-autotable@"^3.5.23" from the root project
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @socialgouv/eslint-config-typescript@1.131.0
npm error Found: typescript@5.8.3
npm error node_modules/typescript
npm error dev typescript@"latest" from the root project
npm error peerOptional typescript@">=5.1.0" from @prisma/client@6.10.1
npm error node_modules/@prisma/client
npm error @prisma/client@"^6.6.0" from the root project
npm error peer @prisma/client@">=2.26.0 || >=3" from @next-auth/prisma-adapter@1.0.7
npm error node_modules/@next-auth/prisma-adapter
npm error @next-auth/prisma-adapter@"^1.0.5" from the root project
npm error 15 more (@typescript-eslint/project-service, ...)
npm error
npm error Could not resolve dependency:
npm error peer typescript@"4" from @socialgouv/eslint-config-typescript@1.131.0
npm error node_modules/@socialgouv/eslint-config-typescript
npm error dev @socialgouv/eslint-config-typescript@"^1.100.0" from the root project
npm error
npm error Conflicting peer dependency: typescript@4.9.5
npm error node_modules/typescript
npm error peer typescript@"4" from @socialgouv/eslint-config-typescript@1.131.0
npm error node_modules/@socialgouv/eslint-config-typescript
npm error dev @socialgouv/eslint-config-typescript@"^1.100.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2025-11-18T17_32_38_934Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2025-11-18T17_32_38_934Z-debug-0.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.5.1->^3.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)
Release Notes
parallax/jsPDF (jspdf)
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 - "" in timezone Europe/Paris, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.