The vulnerability lies in the improper handling of user-supplied input for certain properties within the AcroForm module of jsPDF. Specifically, the setters for the AS property on AcroFormButton and the appearanceState and value properties on AcroFormChildClass were directly assigning user input to internal variables without any sanitization. This allowed an attacker to inject malicious PDF object syntax, including JavaScript actions, into the generated PDF file. When a victim interacts with the crafted form field in the PDF (e.g., hovering over a radio button), the injected JavaScript would execute. The provided patch fixes this by introducing sanitization through the pdfEscapeName function, which properly escapes the input before it's embedded into the PDF structure, thus preventing the injection of arbitrary PDF objects.