CVE-2026-61632
CVE-2026-61632 · PyMdown Extensions: Path traversal in the b64 extension lets <img src> read files outside base_path
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
CVSS 5.3 · Medium · EPSS 0.4% · Fix available
- Published
- Updated
Affected products and versions
pymdown-extensions
- Versions
- < 11.0: Affected
No fix published
pymdown-extensions Debian:12
- Versions
- 10.11.2-1
- 10.13-1
- 10.13-2
- 10.13-3
- 10.13-4
- 10.19.1-1
- 10.19.1-3
- 10.8.1-1
- 10.9-1
- 11.0.1-1
- 9.5-2
- 9.5-3
- 9.5-4
- 9.5-5
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
pymdown-extensions Debian:13
- Versions
- 10.13-1
- 10.13-1+deb13u1
- 10.13-2
- 10.13-3
- 10.13-4
- 10.19.1-1
- 10.19.1-3
- 11.0.1-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
pymdown-extensions Debian:14
- Versions
- 10.13-1
- 10.13-2
- 10.13-3
- 10.13-4
- 10.19.1-1
- 10.19.1-3
- Affected ranges
- ECOSYSTEM: < 11.0.1-1
Update to 11.0.1-1
pymdown-extensions PyPI
- Versions
- 1.0.0
- 1.0.1
- 1.1
- 1.2
- 1.3
- 1.4
- 1.5
- 1.6
- 1.6.1
- 1.7
- 1.8
- 10.0
- 10.0.1
- 10.1
- 10.10
- 10.10.1
- 10.10.2
- 10.11
- 10.11.1
- 10.11.2
- 10.12
- 10.13
- 10.14
- 10.14.1
- 10.14.2
- 10.14.3
- 10.15
- 10.16
- 10.16.1
- 10.17
- 10.17.1
- 10.17.2
- 10.18
- 10.19
- 10.19.1
- 10.2
- 10.2.1
- 10.20
- 10.20.1
- 10.21
- 10.21.2
- 10.21.3
- 10.3
- 10.3.1
- 10.4
- 10.5
- 10.6
- 10.7
- 10.7.1
- 10.8
- 10.8.1
- 10.9
- 2.0
- 3.0
- 3.1
- 3.2
- 3.2.1
- 3.3
- 3.4
- 3.5
- 4.0
- 4.1
- 4.10
- 4.10.1
- 4.10.2
- 4.11
- 4.12
- 4.2
- 4.3
- 4.4
- 4.5
- 4.5.1
- 4.6
- 4.7
- 4.8
- 4.9
- 4.9.1
- 4.9.2
- 5.0
- 6.0
- 6.1
- 6.2
- 6.2.1
- 6.3
- 7.0
- 7.0b1
- 7.0b2
- 7.0rc1
- 7.0rc2
- 7.1
- 8.0
- 8.0.1
- 8.1
- 8.1.1
- 8.2
- 9.0
- 9.0.dev0
- 9.1
- 9.10
- 9.10a1
- 9.10a2
- 9.10a3
- 9.10b1
- 9.10b2
- 9.10b3
- 9.10b4
- 9.10b5
- 9.11
- 9.2
- 9.3
- 9.4
- 9.5
- 9.6
- 9.7
- 9.8
- 9.9
- 9.9.1
- 9.9.2
- Affected ranges
- ECOSYSTEM: < 11.0.0
Update to 11.0.0
python-markdown Ubuntu:14.04:LTS
- Versions
- 2.3.1-1
- 2.3.1-2
- 2.4-1
- 2.4-1ubuntu0.14.04.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:16.04:LTS
- Versions
- 1.0.1-7
- 1.0.1-8
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:16.04:LTS
- Versions
- 2.6.2-1
- 2.6.3-1
- 2.6.4-1
- 2.6.5-1
- 2.6.5-2
- 2.6.6-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:18.04:LTS
- Versions
- 1.0.1-9
- 1.0.1-10
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:18.04:LTS
- Versions
- 2.6.9-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:20.04:LTS
- Versions
- 3.1.1-2
- 3.1.1-2build1
- 3.1.1-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:20.04:LTS
- Versions
- 1.0.1-10
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:22.04:LTS
- Versions
- 1.0.1-10.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:22.04:LTS
- Versions
- 3.3.4-1
- 3.3.6-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:24.04:LTS
- Versions
- 1.0.1-12
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:24.04:LTS
- Versions
- 3.4.4-1
- 3.5.2-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:26.10
- Versions
- 1.0.1-14
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:26.10
- Versions
- 3.10.2-1
- 3.10.2-2
- 3.10.3-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
markdown Ubuntu:26.04:LTS
- Versions
- 1.0.1-14
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
python-markdown Ubuntu:26.04:LTS
- Versions
- 3.8.2-2
- 3.10-1
- 3.10-2
- 3.10.2-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published