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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pymdown-extensions | no fix listed | DEBIAN-CVE-2026-46338 |
| Debian:13 | pymdown-extensions | no fix listed | DEBIAN-CVE-2026-46338 |
| Debian:14 | pymdown-extensions | 11.0.1-1 | DEBIAN-CVE-2026-46338 |
| PyPI | pymdown-extensions | 10.21.3 | GHSA-62q4-447f-wv8h |
| PyPI | pymdown-extensions | 10.21.3 | PYSEC-2026-2999 |
| Ubuntu:24.04:LTS | pymdown-extensions | no fix listed | UBUNTU-CVE-2026-46338 |
| Ubuntu:26.04:LTS | pymdown-extensions | no fix listed | UBUNTU-CVE-2026-46338 |
| Ubuntu:26.10 | pymdown-extensions | no fix listed | UBUNTU-CVE-2026-46338 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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
- https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-62q4-447f-wv8h x_refsource_CONFIRM
- https://github.com/facelessuser/pymdown-extensions/commit/63b7835776d703d6c339cf2110d9888f676efc0c x_refsource_MISC
- https://github.com/facelessuser/pymdown-extensions/releases/tag/10.21.3 x_refsource_MISC