pymdown-extensions is vulnerable to Path Traversal
65
Medium Risk
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.
You are affected if you are using a version that falls within the vulnerable range.
pymdown-extensions is vulnerable to Path Traversal in versions 10.0.1 - 10.21.2.
Upgrade the pymdown-extensions library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant