CVE-2026-31898
mediumpriority · track · 26EPSS 0.004 · 31 %ileDEEURUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6–8.1
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (7)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-2933Splunk SOAR: Mehrere SchwachstellenDeutsch2026-08-19csaf · cert_bundDE
Ein Angreifer kann mehrere Schwachstellen in Splunk SOAR ausnutzen, um Sicherheitsvorkehrungen zu umgehen, um Informationen offenzulegen, um Dateien zu manipulieren, um einen SQL-Injection Angriff durchzuführen, um einen Cross-Site Scripting Angriff durchzuführen, und um beliebigen Programmcode auszuführen.
- GHSA-7x6v-j9x4-qf24jsPDF has a PDF Object Injection via FreeText color2026-03-17ghsa · osvUS
### Impact 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.. * `createAnnotation`: `color` parameter Example attack vector: ```js import { jsPDF } from 'jspdf' const doc = new jsPDF(); const payload = '000000) /AA <</E <</S /Launch /F (calc.exe)>>>> ('; doc.createAnnotation({ type: 'freetext', bounds: { x: 10, y: 10, w: 120, h: 20 }, contents: 'hello', color: payload }); doc.save('test.pdf'); ``` ### Patches The vulnerability has been fixed in jsPDF@4.2.1. ### Workarounds Sanitize user input before passing it to the vulnerable API members.
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (19)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2026-31898cnnvd
- https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208cnnvd
- https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8cnnvd
- https://github.com/parallax/jsPDF/releasesPatchcnnvd
- https://github.com/parallax/jsPDF/releases/tag/v4.2.1cnnvd
- https://github.com/parallax/jsPDF/security/advisories/GHSA-7x6v-j9x4-qf24cnnvd
- https://github.com/parallax/jsPDF/blob/b1607a9391d4cd65ea7ade25998aea8345ae1be3/src/modules/annotations.js#L193-L208enisa_euvd
- https://github.com/parallax/jsPDF/commit/4155c4819d5eca284168e51e0e1e81126b4f14b8enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan