CVE-2026-24737
JSON

8.1high

jsPDF has a PDF Injection in AcroFormChoiceField which allows Arbitrary JavaScript Execution

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.71% (higher than 49% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-pqxr-3g65-p328

Description

jsPDF is a library to generate PDFs in JavaScript. Prior to 4.1.0, 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.addOption, AcroformChoiceField.setOptions, AcroFormCheckBox.appearanceState, and AcroFormRadioButton.appearanceState. The vulnerability has been fixed in jsPDF@4.1.0.

Affected

Product or packageVersionsReported by
parallax jsPDF< 4.1.0CVE List
advanced-cluster-security/rhacs-main-rhel8Not specified
Not affected: from 1773235880 before *, from 1773235860 before *
CVE List
advanced-cluster-security/rhacs-central-db-rhel8Not specifiedCVE List
advanced-cluster-security/rhacs-rhel8-operatorNot specifiedCVE List
advanced-cluster-security/rhacs-roxctl-rhel8Not specifiedCVE List
advanced-cluster-security/rhacs-scanner-v4-db-rhel8Not specifiedCVE List
advanced-cluster-security/rhacs-scanner-v4-rhel8Not specifiedCVE List
jspdf (npm)before 4.1.0GitHub Advisory Database
parall jspdfbefore 4.1.0NVD

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
redhat-SADP8.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Classification

CWE-116CWE-917

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

jsPDF is a library to generate PDFs in JavaScript. Prior to 4.1.0, 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.addOption, AcroformChoiceField.setOptions, AcroFormCheckBox.appearanceState, and AcroFormRadioButton.appearanceState. The vulnerability has been fixed in jsPDF@4.1.0.

GitHub Advisory Database
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.addOption
  • AcroformChoiceField.setOptions
  • AcroFormCheckBox.appearanceState
  • AcroFormRadioButton.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 jsPDF@4.1.0.

Workarounds

Sanitize user input before passing it to the vulnerable API members.

Credits

Research and fix: Ahmet Artuç

NVD (es)

jsPDF es una biblioteca para generar PDFs en JavaScript. Antes de 4.1.0, el control del usuario sobre las propiedades y métodos del módulo Acroform permite a los usuarios inyectar objetos PDF arbitrarios, como acciones JavaScript. Si se da la posibilidad de pasar entrada no saneada a uno de los siguientes métodos o propiedades, un usuario puede inyectar objetos PDF arbitrarios, como acciones JavaScript, que se ejecutan cuando la víctima abre el documento. Los miembros de la API vulnerables son AcroformChoiceField.addOption, AcroformChoiceField.setOptions, AcroFormCheckBox.appearanceState y AcroFormRadioButton.appearanceState. La vulnerabilidad ha sido corregida en jsPDF@4.1.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-24737 changed 2026-08-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-pqxr-3g65-p328 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-24737 changed 2026-08-18Public domain