Vulnerability · Published Jul 16, 2026 · Assigned by GitHub_M

CVE-2026-46338PyMdown Extensions: Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path

Medium 4.3

In plain English

A medium-severity path traversal in pymdown-extensions from facelessuser. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 34% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.3Medium
Exploit odds (30 days)0.4%top 65.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

PyMdown Extensions is a set of extensions for the Python-Markdown markdown project. From 10.0.1 until 10.21.3, pymdownx.snippets uses a string-prefix containment check in SnippetPreprocessor.get_snippet_path() in pymdownx/snippets.py when `restrict_base_path: True`, allowing markdown snippet directives to read files from sibling paths that share the same base_path prefix, such as docs and docs_internal. This is a regression of CVE-2023-32309. This issue is fixed in version 10.21.3.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12pymdown-extensionsno fix listedDEBIAN-CVE-2026-46338
Debian:13pymdown-extensionsno fix listedDEBIAN-CVE-2026-46338
Debian:14pymdown-extensions11.0.1-1DEBIAN-CVE-2026-46338
PyPIpymdown-extensions10.21.3GHSA-62q4-447f-wv8h
PyPIpymdown-extensions10.21.3PYSEC-2026-2999
Ubuntu:24.04:LTSpymdown-extensionsno fix listedUBUNTU-CVE-2026-46338
Ubuntu:26.04:LTSpymdown-extensionsno fix listedUBUNTU-CVE-2026-46338
Ubuntu:26.10pymdown-extensionsno fix listedUBUNTU-CVE-2026-46338

Affected products (as reported)

VendorProductVersions
facelessuser pymdown-extensions >= 10.0.1, < 10.21.3

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

References