CVE-2026-61632PyMdown Extensions: Path traversal in the b64 extension lets <img src> read files…
PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. In versions up to and including 10.21.3, the b64 extension is vulnerable to a path traversal that discloses arbitrary files: it inlines images referenced by <img src="..."> by joining the src onto the configured base_path with os.path.normpath and opening the result directly, without verifying that the resolved path stays inside base_path. As a result, an src containing ../ sequences or an absolute path reads a file outside base_path as long as it has an allowed image extension (.png, .jpg, .jpeg, .gif, .svg), and the file's contents are then base64-encoded into the rendered output, disclosing them. An application that renders untrusted Markdown with pymdownx.b64 enabled can therefore leak the contents of image-extension files readable by the process to whoever controls the Markdown or views the output, a targeted file-read bounded by the extension check. This issue has been fixed in version 11.0.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Debian has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | markdown | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | python-markdown | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | markdown | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | python-markdown | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | markdown | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | python-markdown | Not affected vulnerable_code_not_present | ||
| Debian 14 | pymdown-extensions | Fixed | 11.0.1-1 | DEBIAN-CVE-2026-61632 |
| Debian 13 | pymdown-extensions | Fix pending | DEBIAN-CVE-2026-61632 | |
| Debian 12 | pymdown-extensions | Fix pending | DEBIAN-CVE-2026-61632 | |
| PyPI library | pymdown-extensions | Fixed | 11.0.0 | GHSA-9xwg-3r6f-jcx2 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- facelessuser pymdown-extensions: affected: < 11.0
References
- https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-9xwg-3r6f-jcx2
- https://github.com/facelessuser/pymdown-extensions/releases/tag/11.0
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.