Vulnerabilities/

jsPDF has a PDF Object Injection via Unsanitized Input in addJS Method

Severity:
High

Description

User control of the argument of the addJS method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF.

Recommendation

Update the jspdf package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
jspdf
Anything's wrong? Let us know Last updated on February 19, 2026