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
- CGA-22qr-pm83-p272
- CGA-22vr-m29h-v89w
- CGA-238w-29cr-7748
- CGA-2m5g-qq5x-7r49
- CGA-2v74-rr7c-fhhj
- CGA-35p9-mv2v-j5r8
- CGA-3hjm-qcfg-cjcf
- CGA-474x-944q-rjr5
- CGA-498v-9q54-hgfx
- CGA-49h5-46wg-w2f6
- CGA-4gc5-pw9m-498j
- CGA-4x54-8m97-pp8r
- CGA-5282-mpch-3ww5
- CGA-57p7-mjrr-298w
- CGA-5hcv-59rj-jff8
- CGA-5ph5-rjwj-3r29
- CGA-5wr8-vwc7-wq74
- CGA-5x7w-f8h8-pcr2
- CGA-643x-f5g8-8xjf
- CGA-69px-pr34-4q77
- CGA-6hfx-757p-2f4x
- CGA-6ph9-q2hj-xc5q
- CGA-6pw6-q6rv-c8rm
- CGA-78wv-wmr2-rx42
- CGA-79qf-jx2q-mxhw
- CGA-7jpq-vwh7-j5wx
- CGA-7p4c-vwjg-rx72
- CGA-844g-gh46-hx7j
- CGA-8f38-j78p-x258
- CGA-8g65-x9rj-pf97
- CGA-8h55-p68f-2p3r
- CGA-8pj3-f6rr-gpr4
- CGA-929g-p9g4-hg8x
- CGA-93r9-rrpj-jfw3
- CGA-9578-fh5p-4j74
- CGA-962q-2rf5-3ppp
- CGA-9c97-9mh8-95h4
- CGA-9wpf-8wvj-rrv5
- CGA-c683-7c6p-h3hv
- CGA-cm86-75qv-vgpv
- CGA-fppc-pqv3-49pq
- CGA-fqjx-h4r6-736f
- CGA-fwrx-x2w4-h3mf
- CGA-g2c8-v26w-f4g3
- CGA-g2w8-h4j8-pgwp
- CGA-g89x-p8fg-7jh6
- CGA-gf27-3w25-4f6j
- CGA-gjwx-fm5v-qjrj
- CGA-gq5m-4cw4-9xm4
- CGA-h8qr-rgcp-6w8x
- CGA-hc5g-7jxg-24v2
- CGA-hq9x-m7xc-f5rg
- CGA-hr52-2wcp-9qr6
- CGA-j4wm-pj92-29hq
- CGA-j9f9-xjr8-fv4p
- CGA-jfpq-29hp-3wv6
- CGA-jhfm-642p-8frv
- CGA-m5fg-fgqg-mj7v
- CGA-m7c2-xcvf-459j
- CGA-mmcv-h9w9-cfvj
- CGA-mvch-m5cr-3m46
- CGA-mwmg-2vhr-598h
- CGA-p4m2-jpvw-m853
- CGA-p7jx-j9hr-qpp9
- CGA-p956-fh59-xq3j
- CGA-pf3f-35x7-7v37
- CGA-pmgc-9qqx-gxp4
- CGA-ppq4-v65m-wqq6
- CGA-q2fx-vh8c-jpv7
- CGA-q3q2-pch8-ff7v
- CGA-qf3g-fqxp-869x
- CGA-qp6f-fx66-2jx4
- CGA-qw54-pjm3-897r
- CGA-qw8m-w8j4-pq43
- CGA-r47f-f245-2gw6
- CGA-r8wj-gv3x-jj2f
- CGA-rccp-38xc-j93q
- CGA-rhfj-59cc-gfv3
- CGA-rj42-99m8-98jg
- CGA-rp7f-qv63-9pcx
- CGA-rrr9-8qj2-fr89
- CGA-rww4-x3xc-hw45
- CGA-v3hh-7w2r-c5mg
- CGA-v66g-c869-cfq8
- CGA-vgvp-xrh8-3xvg
- CGA-vmw6-4qw9-h3h7
- CGA-vr3h-6742-xv89
- CGA-vv9p-q48w-4vhr
- CGA-vvw3-2f3x-xwhr
- CGA-vvw6-vgr9-mm34
- CGA-vx4c-4vqm-6c8h
- CGA-w6x8-3gh5-mc95
- CGA-w894-7w2p-3qx7
- CGA-w924-f8w2-98hp
- CGA-wr43-x9mm-r5q8
- CGA-wrwj-rxr5-r42h
- CGA-wx3p-6p7x-g8jg
- CGA-wxrr-x2jf-g4g3
- CGA-x3xp-6rm7-9c9h
- CGA-xq3p-vw5q-wh6q
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-31898.
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