CVE-2025-29907
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.1, user control of the first argument of the addImage method results in CPU utilization and denial of service. If given the possibility to pass unsanitised 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 and addSvgAsImage. The vulnerability was fixed in jsPDF 3.0.1.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.7
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.1, user control of the first argument of the addImage method results in CPU utilization and denial of service. If given the possibility to pass unsanitised 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 and addSvgAsImage. The vulnerability was fixed in jsPDF 3.0.1.
- Record
CVE-2025-29907- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-02
EUVDEUVD-2025-6699
8.7
jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.1, user control of the first argument of the addImage method results in CPU utilization and denial of service. If given the possibility to pass unsanitised 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 and addSvgAsImage. The vulnerability was fixed in jsPDF 3.0.1.
- Record
EUVD-2025-6699- CVSS 4.0
- 8.7 High
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-w532-jxjh-hjhj
8.7
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
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)
- Record
GHSA-w532-jxjh-hjhj- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-02
NVD
8.7
jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.1, user control of the first argument of the addImage method results in CPU utilization and denial of service. If given the possibility to pass unsanitised 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 and addSvgAsImage. The vulnerability was fixed in jsPDF 3.0.1.
- Record
CVE-2025-29907- CVSS 4.0
- 8.7 High
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-02
OSV
8.7
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.1, user control of the first argument of the addImage method results in CPU utilization and denial of service. If given the possibility to pass unsanitised 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 and addSvgAsImage. The vulnerability was fixed in jsPDF 3.0.1.
- Record
CVE-2025-29907- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-02
OSVGHSA-w532-jxjh-hjhj
8.7
jsPDF Bypass Regular Expression Denial of Service (ReDoS)
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)
- Record
GHSA-w532-jxjh-hjhj- CVSS 4.0
- 8.7 High
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 - Weakness
- CWE-400, CWE-770
- Updated
- 2026-11-02
Show 4 moreShow less
OSVCLSA-2026-1773620203 No score
TuxCare security update for jspdf (1 CVE)
TuxCare rebuilt jspdf to address 1 CVE. Fixed in 2.5.2-tuxcare.1.
- Record
CLSA-2026-1773620203- Updated
- 2026-11-02
OSVCLSA-2026-1780534264 No score
TuxCare security update for jspdf (12 CVEs)
TuxCare rebuilt jspdf to address 12 CVEs. Fixed in 2.5.1-tuxcare.1.
- Record
CLSA-2026-1780534264- Updated
- 2026-11-02
OSVCLSA-2026-1780966318 No score
TuxCare security update for jspdf (6 CVEs)
TuxCare rebuilt jspdf to address 6 CVEs. Fixed in 1.4.1-tuxcare.1.
- Record
CLSA-2026-1780966318- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2025-29907 No score
CVE-2025-29907 in jspdf - Patched by Root
Root has patched CVE-2025-29907 in the jspdf package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-29907- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
jspdfnpm |
before 3.0.1 | 3.0.1 |
jspdfTuxCare:npm |
2.5.2-tuxcare.0 up to 2.5.2-tuxcare.1, plus listed versions 2.5.2 |
2.5.2-tuxcare.1 |
jspdfTuxCare:npm From an advisory covering 12 CVEs |
2.5.1-tuxcare.0 up to 2.5.1-tuxcare.1, plus listed versions 2.5.1 |
2.5.1-tuxcare.1 |
jspdfTuxCare:npm From an advisory covering 6 CVEs |
1.4.1-tuxcare.0 up to 1.4.1-tuxcare.1, plus listed versions 1.4.1 |
1.4.1-tuxcare.1 |
jspdfRoot:npm |
before 2.5.2-aikido.1 | 2.5.2-aikido.12.5.2+aikido.2 |
@rootio/jspdfRoot:npm |
before 2.5.2-root.io.1 | 2.5.2-root.io.12.5.2+aikido.2 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-29907 is a high vulnerability (CVSS 8.7) in Parall Jspdf, published March 18, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.70%, the 53rd percentile. Fixed in jspdf 3.0.1.
References
github.com/parallax/jsPDF/security/advisories/GHSA-w532-jxjh-hjhj
github.com/parallax/jsPDF/commit/b167c43c27c466eb914b927885b06073708338df
nvd.nist.gov/vuln/detail/CVE-2025-29907
github.com/advisories/GHSA-w532-jxjh-hjhj
github.com/CVEProject/cvelistV5/tree/main/cves/2025/29xxx/CVE-2025-29907.json
github.com/parallax/jsPDF