CVE-2026-46338
MEDIUM 4.3CVSS 3.1Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path
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.
- Published
- 16 Jul 2026
- Last modified
- 24 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-22
- Also known as
- GHSA-62q4-447f-wv8hPYSEC-2026-2999
- Sources
- NVDJSONOSV GHSA-62q4-447f-wv8hJSONOSV PYSEC-2026-2999JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | facelessuser | pymdown_extensionscpe:2.3:a:facelessuser:pymdown_extensions:*:*:*:*:*:*:*:* |
>= 10.0.1, < 10.21.3 | 10.21.3 |
| OSV | PyPI | pymdown-extensions | >= 10.0.1, < 10.21.3 | 10.21.3 |
References
- https://github.com/facelessuser/pymdown-extensions/commit/63b7835776d703d6c339cf2110d9888f676efc0c · Patch
- https://github.com/facelessuser/pymdown-extensions/releases/tag/10.21.3 · Product, Release Notes
- https://github.com/facelessuser/pymdown-extensions/security/advisories/GHSA-62q4-447f-wv8h · Exploit, Mitigation, Vendor Advisory, WEB
- https://github.com/facelessuser/pymdown-extensions/pull/2039 · WEB
- https://github.com/facelessuser/pymdown-extensions · PACKAGE
- https://pypi.org/project/pymdown-extensions · PACKAGE
- https://github.com/advisories/GHSA-62q4-447f-wv8h · ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-46338 · ADVISORY
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 16 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 19 May 2026)