{"id":"CVE-2026-25755","aliases":["CVE-2026-25755","GHSA-9vjf-qc39-jprp"],"related":[],"kind":"vulnerability","state":"published","title":"jsPDF has PDF Object Injection via Unsanitized Input in addJS Method","summary":"jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in jspdf@4.2.0. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the `addJS` method.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in jspdf@4.2.0. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the `addJS` method.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nUser control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF.\n\n```js\nimport { jsPDF } from \"jspdf\";\nconst doc = new jsPDF();\n// Payload:\n// 1. ) closes the JS string.\n// 2. > closes the current dictionary.\n// 3. /AA ... injects an \"Additional Action\" that executes on focus/open.\nconst maliciousPayload = \"console.log('test');) >> /AA << /O << /S /JavaScript /JS (app.alert('Hacked!')) >> >>\";\n\ndoc.addJS(maliciousPayload);\ndoc.save(\"vulnerable.pdf\");\n```\n\n### Patches\nThe vulnerability has been fixed in jspdf@4.2.0.\n\n### Workarounds\nEscape parentheses in user-provided JavaScript code before passing them to the `addJS` method.\n### References\nhttps://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md","format":"markdown","source":"ghsa"},{"lang":"es","text":"jsPDF es una librería para generar PDFs en JavaScript. Antes de la versión 4.2.0, el control del usuario sobre el argumento del método `addJS` permite a un atacante inyectar objetos PDF arbitrarios en el documento generado. Al elaborar una carga útil que escapa el delimitador de cadena de JavaScript, un atacante puede ejecutar acciones maliciosas o alterar la estructura del documento, lo que afecta a cualquier usuario que abra el PDF generado. La vulnerabilidad ha sido corregida en jspdf@4.2.0. Como solución alternativa, escape los paréntesis en el código JavaScript proporcionado por el usuario antes de pasarlos al método `addJS`.","source":"nvd"}],"published":"2026-02-19T14:41:46.941Z","modified":"2026-09-10T03:50:59.366Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-94","CWE-116"],"affected":[{"ranges":[{"version":"< 4.2.0","status":"affected"}],"vendor":"parallax","product":"jsPDF","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1775594119","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.8","package":"advanced-cluster-security/rhacs-main-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.8::el8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1775594284","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.9","package":"advanced-cluster-security/rhacs-main-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.9::el8","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.2.0"}],"ecosystem":"npm","package":"jspdf","purl":"pkg:npm/jspdf","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.2.0"}],"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-9vjf-qc39-jprp","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/commit/56b46d45b052346f5995b005a34af5dcdddd5437","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md","tags":["exploit","mitigation","third-party-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-25755","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2440993","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25755.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:7110","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:7128","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25755","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/parallax/jsPDF","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-02-19T17:07:08.992Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25755","url":"https://www.cve.org/CVERecord?id=CVE-2026-25755","licence":"CVE Terms of Use","modified":"2026-09-07T12:05:03.219Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9vjf-qc39-jprp","url":"https://github.com/advisories/GHSA-9vjf-qc39-jprp","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:59.366Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25755","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25755","licence":"Public domain","modified":"2026-08-18T12:17:55.890Z"}],"updatedAt":"2026-11-25T22:59:14.197Z","epss":{"score":0.00938,"percentile":0.61901,"date":"2026-12-01T12:00:22.000Z"}}