{"id":"CVE-2025-57810","aliases":["CVE-2025-57810","GHSA-8mvj-3j78-4qmw"],"related":[],"kind":"vulnerability","state":"published","title":"jsPDF Parsing of Corrupt PNGs Leads to Potential Denial of Service (DoS)","summary":"jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.2, 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. The vulnerability was fixed in jsPDF 3.0.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"jsPDF is a library to generate PDFs in JavaScript. Prior to 3.0.2, 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. The vulnerability was fixed in jsPDF 3.0.2.","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 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.\n\nOther affected methods are: `html`.\n\nExample payload:\n\n```js\nimport { jsPDF } from \"jspdf\" \n\nconst payload = new Uint8Array([117, 171, 90, 253, 166, 154, 105, 166, 154])\n\nconst doc = new jsPDF();\nconst startTime = performance.now();\ntry {\n  doc.addImage(payload, \"PNG\", 10, 40, 180, 180, undefined, \"SLOW\");\n} finally {\n  const endTime = performance.now();\n  console.log(`Call to doc.addImage took ${endTime - startTime} milliseconds`);\n}\n```\n\n### Patches\nThe vulnerability was fixed in jsPDF 3.0.2. Upgrade to jspdf@>=3.0.2.\n\nIn jspdf@>=3.0.2, invalid PNG files throw an Error instead of causing very long running loops.\n\n### Workarounds\nSanitize image data or 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.2, 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 datos de imagen o URL no depuradas al método addImage, un usuario podía proporcionar un archivo PNG dañino que provocaba un alto consumo de CPU y una denegación de servicio. Esta vulnerabilidad se corrigió en jsPDF 3.0.2.","source":"nvd"}],"published":"2025-08-26T15:37:28.071Z","modified":"2026-09-10T03:50:58.004Z","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: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"},{"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-20","CWE-770","CWE-835"],"affected":[{"ranges":[{"version":"< 3.0.2","status":"affected"}],"vendor":"parallax","product":"jsPDF","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.2"}],"ecosystem":"npm","package":"jspdf","purl":"pkg:npm/jspdf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.0.2"}],"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-8mvj-3j78-4qmw","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/pull/3880","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/commit/4cf3ab619e565d9b88b4b130bff901b91d8688e9","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/releases/tag/v3.0.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57810","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-08-26T15:58:22.222Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-57810","url":"https://www.cve.org/CVERecord?id=CVE-2025-57810","licence":"CVE Terms of Use","modified":"2025-08-26T15:58:25.184Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8mvj-3j78-4qmw","url":"https://github.com/advisories/GHSA-8mvj-3j78-4qmw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:58.004Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-57810","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57810","licence":"Public domain","modified":"2026-06-17T09:43:28.720Z"}],"updatedAt":"2026-11-25T22:59:03.700Z","epss":{"score":0.00723,"percentile":0.55241,"date":"2026-12-01T12:00:22.000Z"}}