Junglewise Threat Intelligence

CVE-2026-54071: BabelDOC is a document translation tool. Prior to 0.6.3, BabelDOC's vendored PDF parser in babeldoc/pdfminer/cmapdb.py deserializes untruste

CVE-2026-54071 · Severity: high · CVSS 7.8 · Published 2026-08-21

Vendors: PyPI.

Executive brief

BabelDOC, a PDF processing and translation library, contains a vulnerability that allows an attacker to execute malicious code on a victim's system. By tricking a user or an automated system into processing a specially crafted PDF file, an attacker can force the application to load and run a malicious file from the local system. This could lead to a full system compromise, data theft, or unauthorized access to sensitive information with the same permissions as the application.

Technical details

A deserialization vulnerability exists in BabelDOC's vendored PDF parser within `babeldoc/pdfminer/cmapdb.py`. The `_load_data()` method fails to properly sanitize CMap names, removing only NUL bytes. By using hex-encoded absolute paths in a PDF's `/Encoding` name (e.g., `/#2Ftmp#2Fevil`), an attacker can exploit Python's `os.path.join()` behavior to bypass intended directory restrictions. This allows the application to load and deserialize an attacker-controlled `.pickle.gz` file via `pickle.loads()`, leading to arbitrary code execution in the context of the BabelDOC process. The vulnerability is also reachable via the PostScript `usecmap` operator.

Affected products

  • funstory-ai BabelDOC <= 0.6.2

Timeline

  • 2026-06-03: disclosed: EQSTLab reported the vulnerability to maintainers.
  • 2026-06-03: patched: BabelDOC version 0.6.3 released with a fix.
  • 2026-07-10: advisory: GitHub Advisory GHSA-m8gf-v64p-gfmg published.

References