Skip to content

Update dependency jspdf to v3 [SECURITY]#1910

Open
renovate[bot] wants to merge 1 commit into
stagingfrom
renovate/npm-jspdf-vulnerability
Open

Update dependency jspdf to v3 [SECURITY]#1910
renovate[bot] wants to merge 1 commit into
stagingfrom
renovate/npm-jspdf-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Mar 18, 2025

This PR contains the following updates:

Package Change Age Confidence
jspdf 2.5.13.0.1 age confidence

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 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" 

const doc = new jsPDF();
const payload = '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';

const startTime = performance.now()

try {
 doc.addImage(payload, "PNG", 10, 40, 180, 180, undefined, "SLOW");
} catch (err) {
  const endTime = 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.

Credits

Researcher: Aleksey Solovev (Positive Technologies)

Severity

  • CVSS Score: 8.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

parallax/jsPDF (jspdf)

v3.0.1

Compare Source

This release fixes two security vulnerabilities:

  • Upgrade optional dependency canvg to 3.0.11
  • Fix a ReDoS vulnerability in the addImage method and the methods html and addSvgAsImage, which depend on addImage

v3.0.0

Compare Source

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.

New Contributors

Full Changelog: parallax/jsPDF@v2.5.2...v3.0.0

v2.5.2

Compare 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


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 6bd8246 to cbbc43e Compare August 10, 2025 13:51
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from cbbc43e to dc175ea Compare August 19, 2025 15:15
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from dc175ea to a0cb617 Compare August 26, 2025 18:03
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from a0cb617 to 5440718 Compare September 25, 2025 20:02
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 5440718 to d49e001 Compare October 16, 2025 01:30
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from d49e001 to 38509ea Compare December 31, 2025 16:10
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 38509ea to 594886c Compare January 19, 2026 19:51
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 594886c to 53ea257 Compare March 5, 2026 15:53
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 53ea257 to 7ce13a5 Compare March 13, 2026 17:47
@renovate renovate Bot changed the title Update dependency jspdf to v3 [SECURITY] Update dependency jspdf to v3 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/npm-jspdf-vulnerability branch March 27, 2026 04:42
@renovate renovate Bot changed the title Update dependency jspdf to v3 [SECURITY] - autoclosed Update dependency jspdf to v3 [SECURITY] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch 2 times, most recently from 7ce13a5 to 831bf49 Compare March 30, 2026 21:38
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from 831bf49 to b415699 Compare April 29, 2026 18:49
@renovate renovate Bot force-pushed the renovate/npm-jspdf-vulnerability branch from b415699 to 9343dd2 Compare May 12, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants