The vulnerability is an improper input validation issue (CWE-20/CWE-183) in pypdf's image extraction path. The _xobj_to_image function in pypdf/generic/_image_xobject.py handles converting PDF image XObjects to PIL images. When a PDF image stream declares the /DCTDecode filter (JPEG), the vulnerable code called Image.open(BytesIO(data)) without a formats restriction. Pillow's Image.open sniffs the actual byte content to determine the format, so an attacker could craft a PDF whose /DCTDecode stream actually contains non-JPEG data (e.g., EPS, BMP, GIF, PNG, TIFF). This would cause Pillow to invoke an arbitrary image plugin. The most severe consequence is that EpsImagePlugin would execute Ghostscript (gs) on embedded PostScript content, leading to arbitrary command execution when Ghostscript is installed. The fix (commit 512d8eb94eb04be1d1c90504e6da2dcef8679e07) adds formats=("JPEG",) to restrict the plugin selection to JPEG only, matching the pattern already used in the other filter branches (JPX, TIFF/PNG, CCITT, JBIG2). The vulnerable function is _xobj_to_image, which is the single function modified by the patch and the one that would appear in a runtime profile during exploitation.