# CVE-2026-31898: jsPDF has a PDF Object Injection via FreeText color

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.43%, higher than 38% of CVEs (2026-12-01)
- Published: 2026-03-17T17:07:51.000Z
- Modified: 2026-09-10T03:50:38.039Z
- Also known as: GHSA-7x6v-j9x4-qf24
- Weaknesses: CWE-94, CWE-116
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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 jsPDF@4.2.1. As a workaround, sanitize user input before passing it to the vulnerable API members.

(As written by CVE List.)

## Affected

- parallax jsPDF: < 4.2.1
- advanced-cluster-security/rhacs-main-rhel8: no versions given (not affected: from 1775594119 before *; from 1775594284 before *)
- jspdf (npm): before 4.2.1
- parall jspdf: before 4.2.1

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- redhat-SADP: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`

## References

- <https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24> (mitigation, vendor-advisory, web)
- <https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8> (patch, web)
- <https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208> (patch, web)
- <https://github.com/parallax/jsPDF/releases/tag/v4.2.1> (release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-31898> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2448547> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31898.json>
- <https://access.redhat.com/errata/RHSA-2026:7110> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:7128> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-31898> (advisory)
- <https://github.com/parallax/jsPDF> (package)

## Sources

- CVE List: [CVE-2026-31898](https://www.cve.org/CVERecord?id=CVE-2026-31898), CVE Terms of Use, modified 2026-09-07
- GitHub Advisory Database: [GHSA-7x6v-j9x4-qf24](https://github.com/advisories/GHSA-7x6v-j9x4-qf24), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-31898](https://nvd.nist.gov/vuln/detail/CVE-2026-31898), Public domain, modified 2026-08-18

---

Page: https://cve.day/CVE-2026-31898 · Whole record: https://cve.day/CVE-2026-31898.json · Rebuilt by cve.day 2026-11-25T22:59:16.084Z
