The vulnerability lies in the pdfminer.six library's handling of CMap resources within PDF files. The CMapDB._load_data function is responsible for loading these resources, which are stored as pickled and gzipped files. The vulnerability arises because the function constructs a file path based on the /Encoding value in a PDF's font object, and this path was not properly validated. An attacker could craft a PDF with a malicious /Encoding value that points to an arbitrary file path on the system. When pdfminer.six processes this PDF, the _load_data function would attempt to open and deserialize the file at the specified path using pickle.loads(). Since Python's pickle module is not secure against deserializing untrusted data, this allows for arbitrary code execution. The provided patch confirms this analysis by adding path resolution and validation logic within the _load_data function to prevent directory traversal attacks, ensuring that only legitimate CMap files from the designated directory can be loaded.