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

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 25% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-19T20:00:29.000Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-62q4-447f-wv8h, PYSEC-2026-2999
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- facelessuser pymdown-extensions: >= 10.0.1, < 10.21.3
- pymdown-extensions (PyPI): from 10.0.1 before 10.21.3
- facelessuser pymdown_extensions: from 10.0.1 before 10.21.3

## Every score

- GitHub_M: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 4.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 4.3 Medium `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> (exploit, mitigation, vendor-advisory, web)
- <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/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)

## Sources

- CVE List: [CVE-2026-46338](https://www.cve.org/CVERecord?id=CVE-2026-46338), CVE Terms of Use, modified 2026-07-17
- GitHub Advisory Database: [GHSA-62q4-447f-wv8h](https://github.com/advisories/GHSA-62q4-447f-wv8h), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-46338](https://nvd.nist.gov/vuln/detail/CVE-2026-46338), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-2999](https://osv.dev/vulnerability/PYSEC-2026-2999), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-46338 · Whole record: https://cve.day/CVE-2026-46338.json · Rebuilt by cve.day 2026-11-25T22:59:28.417Z
