Mehrere Schwachstellen (CVE-2026-31898, CVE-2026-31938) in Javascript-Pdf-Bibliothek

⚠️ CVE-Referenzen: CVE-2026-31898 CVE-2026-31938

Zusammenfassung

Die JavaScript-PDF-Bibliothek jsPDF wies bis Version 4.2.1 eine kritische Sicherheitslücke auf, die es Angreifern ermöglichte, über unsanitierte Eingaben in der "output"-Funktion beliebigen HTML-Code in den Browser-Kontext des Opfers einzuschleusen. Dies erlaubte die Ausführung von Skripten und den Zugriff auf sensible Daten. Der Patch in Version 4.2.1 behebt das Problem. Bis dahin sollte man Benutzereingaben vor der Übergabe an die "output"-Funktion sorgfältig überprüfen.

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of the `options` argument of the `output` function allows attackers to inject arbitrary HTML (such as scripts) into the browser context the created PDF is opened in. The vulnerability can be exploited in the following scenario: the attacker provides values for the output options, for example via a web interface. These values are then passed unsanitized (automatically or semi-automatically) to the attack victim. The victim creates and opens a PDF with the attack vector using one of the vulnerable method overloads inside their browser. The attacker can thus inject scripts that run in the victims browser context and can extract or modify secrets from this context. The vulnerability has been fixed in jspdf@4.2.1. As a workaround, sanitize user input before passing it to the output method.
Quelle: app.opencve.io