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.
Published: 2026-07-16
Score: 4.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PyMdown Extensions is a set of extensions for the Python‑Markdown markdown project. From releases 10.0.1 through 10.21.3, the snippet extension (pymdownx.snippets) uses a string‑prefix containment check in SnippetPreprocessor.get_snippet_path() when restrict_base_path is 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 regression of CVE‑2023‑32309 introduces a path‑traversal bypass that can lead to disclosure of arbitrary files within these sibling directories. The issue is fixed by upgrading to version 10.21.3 or newer.

Affected Systems

The vulnerability affects the Python package facelessuser:pymdown-extensions, specifically the snippet extension component pymdownx.snippets. All installations within the affected version range (10.0.1–10.21.3) are impacted. Deployments using version 10.21.3 or newer are no longer vulnerable.

Risk and Exploitability

Based on the description, it is inferred that the attacker must supply malicious markdown content that the application processes to exploit this path traversal. The risk is moderate: the flaw permits local file disclosure rather than remote code execution and requires the attacker to supply markdown content that the application processes. The CVSS score of 4.3 reflects this moderate severity, while the EPSS score of < 1 % indicates a very low likelihood of exploitation. The issue is not listed in the CISA KEV catalog. Administrators should consider the confidentiality risk, particularly if the markdown rendering process runs with elevated privileges or processes untrusted content on a web server.

Generated by OpenCVE AI on August 1, 2026 at 08:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pymdown-extensions to version 10.21.3 or later to remove the path traversal bypass
  • If an immediate upgrade is not feasible, disable the snippet extension for untrusted markdown or restrict its use to trusted input sources only
  • Consider running the markdown rendering process in a sandboxed environment or container to limit local file access

Generated by OpenCVE AI on August 1, 2026 at 08:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-62q4-447f-wv8h Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path
History

Mon, 20 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 17 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Facelessuser
Facelessuser pymdown Extensions
Vendors & Products Facelessuser
Facelessuser pymdown Extensions

Thu, 16 Jul 2026 18:45:00 +0000

Type Values Removed Values Added
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.
Title PyMdown Extensions: Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'}


Subscriptions

Facelessuser Pymdown Extensions
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-17T17:52:57.729Z

Reserved: 2026-05-13T18:37:30.990Z

Link: CVE-2026-46338

cve-icon Vulnrichment

Updated: 2026-07-17T17:52:32.788Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-16T18:24:18Z

Links: CVE-2026-46338 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T08:45:02Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')