Description
BabelDOC is a document translation tool. Prior to 0.6.3, BabelDOC's vendored PDF parser in babeldoc/pdfminer/cmapdb.py deserializes untrusted pickle data when CMapDB._load_data() loads CMap files. PDF-controlled Encoding or CMapName values and embedded PostScript usecmap operators can reach this sink after path separators are decoded, while _normalize_cmap_name() removes only a leading slash. Absolute paths or traversal sequences can escape the trusted CMap directories through os.path.join(), select an attacker-writable .pickle.gz file, and cause pickle.loads() to execute arbitrary Python code with the privileges of the BabelDOC process. This issue is fixed in version 0.6.3.
Published: 2026-08-21
Score: 7.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

BabelDOC, a document translation tool, contains an untrusted pickle deserialization flaw in its bundled PDF parser. The flaw is triggered when the CMapDB module loads CMap files without properly validating the path name. An attacker can craft a PDF that includes a specially crafted CMap or usecmap operator which, once decoded, points to an attacker-controlled .pickle.gz file placed in the CMap directories. The pickle loader will then execute arbitrary Python code with the permissions of the running BabelDOC process, allowing full system compromise in that environment. The issue is fixed in version 0.6.3, and the vulnerability is now contained to older releases.

Affected Systems

The vulnerability affects funstory-ai’s BabelDOC product. Any installation of BabelDOC older than version 0.6.3 is susceptible, as the code path that deserializes external pickle data remains unpatched in those releases.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity level. EPSS is not available, so the likelihood of exploitation cannot be quantified, but the lack of a KEV listing suggests no widespread active exploitation has been reported yet. The likely attack vector is via a malicious PDF processed by BabelDOC, which can be delivered locally or potentially over a network if BabelDOC is exposed to external PDF uploads.

Generated by OpenCVE AI on August 21, 2026 at 20:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade BabelDOC to version 0.6.3 or newer, which removes the vulnerable pickle deserialization logic.
  • Run the BabelDOC process with the least privileges necessary and restrict file system access to the CMap directories so that even if a malicious pickle is loaded, it cannot be written to writable locations that could be leveraged by the attacker.
  • Ensure that only trusted PDFs are processed by BabelDOC; if possible, pre-sanitize or validate incoming PDFs to disallow usecmap operations or to reject any documents that reference external CMap files.

Generated by OpenCVE AI on August 21, 2026 at 20:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m8gf-v64p-gfmg BabelDOC: Arbitrary Code Execution via CMap Pickle Deserialization in babeldoc/pdfminer/cmapdb.py
History

Fri, 21 Aug 2026 19:15:00 +0000

Type Values Removed Values Added
Description BabelDOC is a document translation tool. Prior to 0.6.3, BabelDOC's vendored PDF parser in babeldoc/pdfminer/cmapdb.py deserializes untrusted pickle data when CMapDB._load_data() loads CMap files. PDF-controlled Encoding or CMapName values and embedded PostScript usecmap operators can reach this sink after path separators are decoded, while _normalize_cmap_name() removes only a leading slash. Absolute paths or traversal sequences can escape the trusted CMap directories through os.path.join(), select an attacker-writable .pickle.gz file, and cause pickle.loads() to execute arbitrary Python code with the privileges of the BabelDOC process. This issue is fixed in version 0.6.3.
Title BabelDOC: Arbitrary Code Execution via CMap Pickle Deserialization in babeldoc/pdfminer/cmapdb.py
Weaknesses CWE-502
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T18:55:42.248Z

Reserved: 2026-06-11T18:24:35.098Z

Link: CVE-2026-54071

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-21T19:17:02.720

Modified: 2026-08-21T19:17:02.720

Link: CVE-2026-54071

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T20:30:07Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data