Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-m8gf-v64p-gfmg: BabelDOC: Arbitrary Code Execution via CMap Pickle Deserialization in babeldoc/pdfminer/cmapdb.py

0
High
Published: 07/10/2026 (07/10/2026, 19:32:44 UTC)
Source: GCVE Database
Product: BabelDOC

Description

BabelDOC versions prior to 0.6.3 contain a vulnerability in the PDF parser component where untrusted pickle data is deserialized without proper path validation. An attacker can craft a PDF with a specially encoded CMap name that causes the software to load and deserialize arbitrary pickle files from attacker-controlled locations, leading to arbitrary code execution with the privileges of the BabelDOC process.

CVSS v3.1

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected software

PyPIghsa
BabelDOC
Affected versions
<0.6.3

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/11/2026, 09:49:47 UTC

Technical Analysis

The vulnerability exists in BabelDOC's vendored PDF parser (babeldoc/pdfminer/cmapdb.py) in the _load_data() method, which deserializes pickle data from CMap files. The method strips only NUL bytes from a PDF-controlled CMap name and constructs a filename that is joined with trusted directories using os.path.join(). However, if the CMap name is an absolute path (achieved via PDF hex-encoding), os.path.join() discards the trusted directory and uses the absolute path directly. This allows an attacker to redirect deserialization to any attacker-writable .pickle.gz file on the local system. Since pickle.loads() is called unconditionally on this file, arbitrary Python code execution can occur. There is no path containment check or allowlist of CMap names, and no integrity verification of the pickle data. The vulnerability is identified as CWE-502 (Deserialization of Untrusted Data).

Potential Impact

Successful exploitation allows an attacker to execute arbitrary Python code with the privileges of the BabelDOC process by controlling the deserialized pickle data. This can lead to full compromise of the host system or further attacks depending on the environment and privileges of BabelDOC.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended patch involves validating that the resolved file path is contained within trusted directories by using os.path.realpath() and os.path.commonpath() before deserializing pickle data. Until a patch is applied, avoid processing untrusted PDFs with BabelDOC or run BabelDOC with minimal privileges and in isolated environments to limit impact.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-m8gf-v64p-gfmg
Osv Schema Version
1.4.0
Aliases
["CVE-2026-54071"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a520eb368715ace438f526a

Added to database: 07/11/2026, 09:36:51 UTC

Last enriched: 07/11/2026, 09:49:47 UTC

Last updated: 07/12/2026, 03:34:20 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses