CVE Catalog

CVE-2026-31898

HighCVSS 8.1
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.36%

29th percentile - higher than 29% of all known CVEs

Summary

jsPDF library prior to version 4.2.1 is vulnerable to injection of arbitrary PDF objects, including JavaScript actions, via the `color` parameter of the `createAnnotation` method. An attacker can exploit this to execute malicious code when the PDF is opened.

Risk Assessment

The risk involves potential remote code execution in the context of the PDF recipient, which could lead to data theft, malware infection, or unauthorized system access.

Recommendation

Immediately update jsPDF to version 4.2.1 or later. If an update is not possible, thoroughly sanitize user input before passing it to the `createAnnotation` method.

Other vulnerabilities in jsPDF

See all
Original NVD description (English source)

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of arguments of the `createAnnotation` method allows users to inject arbitrary PDF objects, such as JavaScript actions. If given the possibility to pass unsanitized input to the following method, a user can inject arbitrary PDF objects, such as JavaScript actions, which might trigger when the PDF is opened or interacted with the `createAnnotation`: `color` parameter. The vulnerability has been fixed in [email protected]. As a workaround, sanitize user input before passing it to the vulnerable API members.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS