Vulnerability
CVE-2026-31898
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.
101 advisories report this vulnerability, across 3 ecosystems.
Advisories in Wolfi
- CGA-238w-29cr-7748
- CGA-2m5g-qq5x-7r49
- CGA-35p9-mv2v-j5r8
- CGA-4x54-8m97-pp8r
- CGA-5282-mpch-3ww5
- CGA-5hcv-59rj-jff8
- CGA-7p4c-vwjg-rx72
- CGA-844g-gh46-hx7j
- CGA-9wpf-8wvj-rrv5
- CGA-c683-7c6p-h3hv
- CGA-fwrx-x2w4-h3mf
- CGA-gjwx-fm5v-qjrj
- CGA-hr52-2wcp-9qr6
- CGA-mvch-m5cr-3m46
- CGA-q2fx-vh8c-jpv7
- CGA-qf3g-fqxp-869x
- CGA-rhfj-59cc-gfv3
- CGA-rj42-99m8-98jg
- CGA-rp7f-qv63-9pcx
- CGA-v3hh-7w2r-c5mg
- CGA-v66g-c869-cfq8
- CGA-w894-7w2p-3qx7
- CGA-wr43-x9mm-r5q8
- CGA-wrwj-rxr5-r42h
References
- https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208
- https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8
- https://github.com/parallax/jsPDF/releases/tag/v4.2.1
- https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24
- https://access.redhat.com/errata/RHSA-2026:7110
- https://access.redhat.com/errata/RHSA-2026:7128
- https://access.redhat.com/security/cve/CVE-2026-31898
- https://bugzilla.redhat.com/show_bug.cgi?id=2448547
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31898.json