Quick answers
- Is CVE-2026-46338 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-46338 being exploited in the wild.
- How severe is CVE-2026-46338?
- Medium severity, with a CVSS score of 4.3, published 16 July 2026.
- Which products and versions are affected?
- pymdown-extensions (PyPI) >= 10.0.1, <= 10.21.2, ECOSYSTEM:introduced=10.0.1,fixed=10.21.3.
- Is there a fix for CVE-2026-46338?
- Yes. pymdown-extensions (PyPI): upgrade to 10.21.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-46338 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-46338?
- Check whether you run pymdown-extensions (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- pymdown-extensions (PyPI): upgrade to 10.21.3 or later
pip install "pymdown-extensions>=10.21.3"
Technical details
A path traversal vulnerability exists in the `pymdownx.snippets` extension due to an improper string-prefix containment check in `SnippetPreprocessor.get_snippet_path()`. When `restrict_base_path` is enabled, the code uses `filename.startswith(base)` to validate paths. Because it fails to enforce a directory boundary (e.g., by appending a trailing slash), an attacker can use a snippet directive to access sibling directories that share the same prefix as the base path (e.g., accessing 'docs_internal' when 'docs' is the base). This is a regression of CVE-2023-32309. The issue is fixed in version 10.21.3 by ensuring the prefix check includes the operating system's path separator.
Affected products
- facelessuser PyMdown Extensions >= 10.0.1, < 10.21.3
Identifiers
- CVE-2026-46338
- GHSA-62q4-447f-wv8h
- PYSEC-2026-2999
Timeline
- 2023-05-15: other: Vulnerability introduced in version 10.0.1 via PR #2039
- 2026-05-13: patched: Fixed in version 10.21.3
- 2026-07-16: advisory: CVE-2026-46338 published