jsPDF, a JavaScript library used for generating PDFs, contains a flaw where insufficient sanitization of user-controlled input within the `options` argument of the `output` function allows attackers to inject arbitrary HTML, including scripts, into the browser context when a generated PDF is opened. This can lead to the execution of malicious code within the victim's browser, potentially allowing attackers to extract or modify sensitive information. The vulnerability affects the `"pdfobjectnewwindow"`, `"pdfjsnewwindow"`, and `"dataurlnewwindow"` overloads, specifically impacting the `pdfObjectUrl`, `pdfJsUrl`, and `filename` options. An example attack vector involves crafting a malicious payload within the `filename` option to inject a script tag.