CVE-2026-61632 Details
Description
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.
A path traversal vulnerability has been identified in the b64 extension of PyMdown Extensions, affecting versions through 10.21.3. The vulnerability allows arbitrary file disclosure by inlining images referenced in Markdown via <img src='...'> tags. The extension joins the image source onto a configured base path, normalizes the path, and opens the file without verifying that it remains within the base path. This oversight enables the inclusion of files located outside the base path, as long as they have an allowed image extension (.png, .jpg, .jpeg, .gif, .svg). The contents of these files are then base64-encoded and included in the rendered output, potentially leaking sensitive information.
Users can upgrade to PyMdown Extensions version 11.0 or later, which addresses the vulnerability by restricting relative links to the base path and allowing users to specify a different root path if needed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 7, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
No affected product data is available for this CVE.
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 7, 2026 | CVE Modified | CISA-ADP |
| Aug 6, 2026 | New CVE Received | [email protected] |