Back to list

Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path — CVE-2026-46338

GitHub · GitHub · CVE-2026-46338

ID
CVE-2026-46338
Date
Activity
Source
GitHub
Vendor
GitHub
Threat
medium
CVSS
4.3

Summary

# Summary `pymdownx.snippets` has a regression of the CVE-2023-32309 / GHSA-jh85-wwv9-24hv fix. With `restrict_base_path: True` (the default), the current `filename.startswith(base)` containment check does not enforce a directory boundary. As a result, a markdown snippet directive can read files from sibling paths that share the same prefix as `base_path`, such as `docs` vs `docs_internal`. The regression was…

Product

pip: pymdown-extensions

What to do

General, cautious steps (verify details in the official source):

  • Review exposure and plan remediation based on risk and environment.
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Related advisories