fix(deps): update dependency jspdf to v3 [security] #213
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:
^1.3.5->^3.0.0Cross-site scripting in jspdf
CVE-2020-7690 / GHSA-vh59-v9r5-4mh4
More information
Details
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). It's possible to inject JavaScript code via the
htmlmethod.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Cross-site scripting in jspdf
CVE-2020-7691 / GHSA-3q6f-8grx-pr4v
More information
Details
It's possible to use nested script tags in order to bypass the filtering regex.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
jspdf vulnerable to Regular Expression Denial of Service (ReDoS)
CVE-2021-23353 / GHSA-57f3-gghm-9mhc
More information
Details
This affects the package jspdf before 2.3.1. ReDoS is possible via the addImage function.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
CVE-2025-29907 / GHSA-w532-jxjh-hjhj
More information
Details
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)
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
jsPDF Denial of Service (DoS)
CVE-2025-57810 / GHSA-8mvj-3j78-4qmw
More information
Details
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)
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
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
v2.5.2Compare Source
This release upgrades the Dompurify dependency to 2.5.4 with fixes a vulnerability with high severity: GHSA-mmhx-hmjr-r674.
It also upgrades fflate, core-js, and @babel/runtime to more recent versions.
What's Changed
v2.5.1Compare Source
This release fixes two security related issues.
output('pdfobjectnewwindow')setDisplayMode(CWE-1333)v2.5.0Compare Source
This release adds some minor new features and fixes some bugs, e.g. related to multiline text. Thanks to all contributors!
New Features
getLineWidthfunctionhorizontalScaleoption totextfunctionBugfixes
htmlfunction only rendering on the first invocation per documentcontext2D.closePath(now properly closes the path)textWithLinkfor multiline textlineHeightFactorintextoptions having no effecthtmltypingssavefunction in typings (promise overload)v2.4.0Compare Source
This release brings long awaited improvements to the
htmlfunction and many other bugfixes and improvements. Thanks to all contributors!widthandwindowWidthoptions to thehtmlmethod, which will make correct scaling much easier.marginoption forhtmlmethod and addautoPagingoption with two different modes:'slice'and'text'.setLineDashandlineDashOffsettocontext2d.rowStartandcellStartevents andheaderTextColorproperty to `table' functionsetFontwithfontWeightparameter for the built-in basic fontsaddImageperformance.addImage.getDrawColorfunction to typings.addImage.jsPDFOptionstype in the typings.outputfunction.v2.3.1Compare Source
Small bugfixes. Thanks to all contributors!
getTextDimensions()withmaxWidthsettable()functionaddImagefunctionoutputfunctionv2.3.0Compare Source
A couple of bugfixes, improved font handling and faster compression.
textWithLinkoptions.flagsparameter was ignored by thetextmethod and consequently had the wrong defaults. This lead to garbled characters sometimes and was a regression to 1.5.3.fontFacesoption for thehtmlmethod that allows to add fonts similar CSS@font-facerules (noaddFontcalls required anymore). When supplied, fonts are resolved using the CSS 3 font loading algorithm.v2.2.0Compare Source
Incorporates many of the awesome contributions in context of the Hacktoberfest. Thanks to all the contributors!
maxWidthtext optionImageCompressiontextmethod"Could not load <module>"error messagesv2.1.1Compare Source
html()typings and JSDoc documentationeventsin typingsv2.1.0Compare Source
v2.0.0Compare Source
Finally a new release!
A lot has changed since the last release:
jspdf.debug/min.jsis nowjspdf.umd(.min).js. We also changed the name of the global variable tojspdf(lower case) when using script tags to be consistent with the new es modules format and named imports/exports. For backwards compatibility add this line:addHTML,fromHTML,html2pdf,addSvg,addButton,addTextField,addChoiceField,cellInitialize,setFontStyle,setFontType,clip_fixed.Here an (incomplete) list of additional bugfixes and changes:
maxWidthparameter togetTextDimensionshtmlmethod that occurred with html2canvas@1.0.0-rc5htmlmethodThere are some breaking changes in the API. But these are mostly API-methods which you should not use anyway.
While this release is a big step in the right direction, there are still many open issues (currently ~90). The maintainers of this repo (currently mostly @HackbrettXXX) have very limited time and can't resolve them all without the help of the community. This is another shout out to the community: if you like this project and want to make it even more awesome, consider spending one or two hours on improving it. Pull requests are very much appreciated!
v1.5.3: "The One With Rebuilt Documentation"Compare Source
v1.5.2: v.1.5.2 "The One Where Version Numbers Populate Correctly"Compare Source
v1.5.1: Update documentationCompare Source
v1.4.1: v.1.4.1 “The One Where Webpack Works Again”Compare Source
Thanks to @arasabbasi and @dasaCoder. We've got another bugfix release:
ea4c174)e43a913,5d0b760)e43a913)e43a913)var TextField = new jsPDF.API.AcroForm.TextField()orvar TextField = new doc.AcroFormTextField();in AcroForm.js31bb2fd)7a1089a)38b50f4)extractInfoFromBase64DataURIin addImage-Plugin (c0a5e3a)getImageFileTypeByImageDatain addImage.js (3d32fb7)3d32fb7)addSVGtoaddSvg,but keepingaddSVGfor backwards-compatibility to svg.js (3d32fb7)build.jsindependent from git call (c2d8501)4efd59c,f03af75,25e8330,f03af75)fc81d12)v1.4.0Compare Source
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 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.