Security: Upgrade pymdown-extensions to 10.21.3 (CVE-2026-46338)#182
Open
scotmatson wants to merge 1 commit into
Open
Security: Upgrade pymdown-extensions to 10.21.3 (CVE-2026-46338)#182scotmatson wants to merge 1 commit into
scotmatson wants to merge 1 commit into
Conversation
Addresses path traversal vulnerability in pymdownx.snippets preprocessor that allows reading files outside base_path using sibling prefix bypass. Risk assessment: MINIMAL - Snippets extension is enabled but not used (zero instances of --8<--) - Default restrict_base_path configuration is safe - No secrets or sensitive files in repository root Testing performed: - Documentation builds successfully with strict mode - Sanity tests pass (30 tests in 0.14s) - Pre-commit hooks pass (ruff format, ruff lint, interrogate) - Site structure unchanged (only timestamps differ) Full test suite will run in CI (6,772+ tests with 90%+ coverage). References: - CVE-2026-46338 - GHSA-62q4-447f-wv8h - Dependabot alert #13 - pymdown-extensions 10.21.3 release (2026-05-13) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades pymdown-extensions from 10.21.2 to 10.21.3 to address CVE-2026-46338, a medium-severity path traversal vulnerability in the snippets preprocessor.
Origin: This security issue was surfaced by Dependabot alert #13.
Risk Assessment
Actual exposure: MINIMAL
pymdownx.snippetsfeature is enabled but not used (zero instances in docs)restrict_base_path: true) provides protectionVulnerability Details
CVE: CVE-2026-46338 / GHSA-62q4-447f-wv8h
Affected: pymdown-extensions 10.0.1 - 10.21.2
Fixed in: 10.21.3 (released 2026-05-13)
Dependabot alert: #13
Technical issue: Path traversal in
pymdownx.snippetspreprocessor allows reading files outsidebase_pathusing sibling prefix bypass. The vulnerable code usesfilename.startswith(base)for path containment checks, which doesn't enforce directory boundaries. This allows snippet directives like--8<-- "../docs_secret/file.txt"to bypassrestrict_base_pathsettings and read files from sibling directories that share the same prefix (e.g.,docsvsdocs_secret).Attack scenario:
--8<-- "../sensitive_dir/secrets.txt"Impact: Arbitrary file read within the host filesystem, bounded by prefix matching. In CI/CD contexts, could expose secrets or sensitive files in documentation builds.
Testing
mkdocs build --strict)Changes
uv.lock: pymdown-extensions 10.21.2 → 10.21.3Post-Merge Actions
pymdownx.snippetsextension frommkdocs.ymlfor defense-in-depthReferences