CVE-2026-54071 BabelDOC: Arbitrary Code Execution via CMap Pickle Deserialization in babeldoc/pdfminer/cmapdb.py
Attackers can execute arbitrary code by crafting malicious PDFs that trigger unsafe pickle deserialization in BabelDOC's PDF parser.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-54071?
CVE-2026-54071 is a high-severity unsafe deserialization vulnerability in funstory-ai BabelDOC, published on 21 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-502
Which versions are affected by CVE-2026-54071?
3 open source packages ship an affected version, including babeldoc and BabelDOC.
| Package | Affected | Fixed in |
|---|---|---|
babeldoc PyPI | All versions | 0.6.3 |
babeldoc PyPI | All versions | 0.6.3 |
BabelDOC PyPI | All versions | 0.6.3 |
How do I fix CVE-2026-54071?
Upgrade babeldoc to 0.6.3 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2026-54071 being exploited?
There is no known exploitation of CVE-2026-54071 in the wild and no public exploit code.
Sources
Also known as GHSA-m8gf-v64p-gfmg, PYSEC-2026-2389.