Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. jspdf
  4. ›
  5. CVE-2025-29907

CVE-2025-29907: jsPDF Bypass Regular Expression Denial of Service (ReDoS)

March 18, 2025 (updated March 19, 2025)

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"

References

  • github.com/advisories/GHSA-w532-jxjh-hjhj
  • github.com/parallax/jsPDF
  • github.com/parallax/jsPDF/commit/b167c43c27c466eb914b927885b06073708338df
  • github.com/parallax/jsPDF/security/advisories/GHSA-w532-jxjh-hjhj
  • nvd.nist.gov/vuln/detail/CVE-2025-29907

Code Behaviors & Features

Detect and mitigate CVE-2025-29907 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.0.1

Fixed versions

  • 3.0.1

Solution

Upgrade to version 3.0.1 or above.

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

npm/jspdf/CVE-2025-29907.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:59 +0000.