Intel

AIKIDO-2026-10830

pymdown-extensions is vulnerable to Path Traversal

Path TraversalCVE-2026-46338 Published May 19, 2026

65

Medium Risk

This Affects:

PYTHONpymdown-extensions
10.0.1 - 10.21.2
Fixed in 10.21.3
Are you affected? Scan for Free

TL;DR

The snippets extension resolves include paths against base_path and rejects paths outside that directory when restrict_base_path is enabled. A regression used a raw string prefix test on absolute paths, so resolved paths under sibling directories whose names extend the same prefix still passed the check and could be read from Markdown. The fix restores a separator-aware boundary so the resolved file must lie under the intended base directory. The issue matters when less-trusted Markdown is rendered in a build that should only expose files under a configured documentation root.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

pymdown-extensions is vulnerable to Path Traversal in versions 10.0.1 - 10.21.2.

How to fix this

Upgrade the pymdown-extensions library to the patch version.