CVE Catalog

CVE-2026-46338

MediumCVSS 4.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.26%

17th percentile - higher than 17% of all known CVEs

Summary

A vulnerability in PyMdown Extensions (versions 10.0.1 through 10.21.3) allows bypassing the base path restriction in the SnippetPreprocessor.get_snippet_path() function. The string-prefix containment check enables reading files from sibling directories sharing the same base_path prefix, representing a regression of the fix for CVE-2023-32309.

Risk Assessment

An attacker can exploit this flaw to read sensitive files outside the allowed base directory, potentially leading to disclosure of confidential data or application configuration.

Recommendation

Immediately upgrade PyMdown Extensions to version 10.21.3 or later, which includes a proper implementation of the base path restriction.

Other vulnerabilities in PyMdown Extensions

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS