CVE-2026-24737

jsPDF · jsPDF Multiple Products

A high-severity vulnerability has been identified in the jsPDF library, which is used to generate PDF documents in web applications.

Executive summary

A high-severity vulnerability has been identified in the jsPDF library, which is used to generate PDF documents in web applications. This flaw allows an attacker to embed malicious code into a generated PDF, which can execute when the document is opened by a user. Successful exploitation could lead to the theft of sensitive user data, account takeover, and other malicious actions within the context of the affected web application.

Vulnerability

The vulnerability is an Improper Input Sanitization flaw leading to a Cross-Site Scripting (XSS) condition. An attacker can supply specially crafted input, such as strings containing JavaScript payloads, to an application that uses the jsPDF library to generate a PDF. The library fails to properly sanitize this input when embedding it into interactive elements within the PDF, such as hyperlinks or form fields. When a victim opens the maliciously crafted PDF in a modern web browser or a compatible PDF viewer that supports JavaScript, the embedded script will execute in the security context of the website that generated the document, allowing the attacker to bypass standard browser security controls.

Business impact

This vulnerability is rated as High severity with a CVSS score of 8.1. Exploitation could have significant negative consequences for the business, including the compromise of user accounts, theft of sensitive session cookies, and unauthorized access to Personally Identifiable Information (PII) or other confidential data handled by the application. This can lead to direct financial loss, severe reputational damage, loss of customer trust, and potential regulatory fines for data breaches. The risk is especially high for applications that generate reports, invoices, or other documents containing user-submitted content.

Remediation

Immediate Action: Apply the security updates provided by the vendor to all systems and applications using the vulnerable jsPDF library immediately. Prioritize patching for public-facing applications. After patching, monitor application logs and security tools for any signs of attempted or successful exploitation and review historical access logs for suspicious activity patterns.

Proactive Monitoring: Implement enhanced monitoring of application inputs that are passed to the jsPDF library. Security teams should look for suspicious strings in logs that include HTML tags, JavaScript event handlers (e.g., onerror, onload), or JavaScript URI schemes (e.g., javascript:...). Monitor for anomalous outbound network connections from clients who have recently accessed PDFs generated by the application.

Compensating Controls: If immediate patching is not feasible, implement the following controls:

  • Enforce strict server-side input validation and output encoding on all user-supplied data before it is passed to the jsPDF library.
  • Deploy a Web Application Firewall (WAF) with rules specifically configured to detect and block XSS attack payloads.
  • If possible, configure the jsPDF library to disable interactive features or JavaScript execution within the generated PDFs, though this may impact functionality.

Exploitation status

Public Exploit Available: false

Analyst recommendation

Given the High severity rating (CVSS 8.1) and the widespread use of the jsPDF library in web applications, we recommend immediate action. Organizations must prioritize applying the vendor-supplied patches to all affected applications to mitigate the risk of data theft and user account compromise. While this vulnerability is not currently on the CISA KEV catalog, its high potential for impact warrants urgent attention. The remediation and monitoring steps outlined in this report should be implemented without delay to protect the organization's data, users, and reputation.