CVE-2026-46338 Details
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.
A directory traversal vulnerability has been identified in PyMdown Extensions, specifically within the 'pymdownx.snippets' module, versions 10.0.1 prior to 10.21.3. When the 'restrict_base_path' option is enabled, the snippet processor can be manipulated to read files from sibling directories that share the same base path prefix. This issue reintroduces a previously fixed vulnerability (CVE-2023-32309) by replacing a robust directory boundary check with a less stringent string-prefix comparison, allowing unauthorized file access from adjacent directories.
Users can upgrade to PyMdown Extensions version 10.21.3 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-62q4-447f-wv8h | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/facelessuser/pymdown-extensions/commit/63b7835776d703d6c339cf2110d9888f676efc0c | [email protected] | Patch |
| https://github.com/facelessuser/pymdown-extensions/releases/tag/10.21.3 | [email protected] | ProductRelease Notes |
| https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-62q4-447f-wv8h | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| facelessuser pymdown extensions | >= 10.0.1, < 10.21.3 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 30, 2026 | Initial Analysis | [email protected] |
| Jul 17, 2026 | CVE Modified | CISA-ADP |
| Jul 16, 2026 | New CVE Received | [email protected] |