Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 77%

CVE-2026-46338: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in facelessuser pymdown-extensions

0
Medium
VulnerabilityCVE-2026-46338cvecve-2026-46338cwe-22
Published: 07/16/2026 (07/16/2026, 18:24:18 UTC)
Source: CVE Database V5
Vendor/Project: facelessuser
Product: pymdown-extensions

Description

CVE-2026-46338 is a path traversal vulnerability in the pymdown-extensions Python package, specifically in the SnippetPreprocessor component when the restrict_base_path option is enabled. Versions from 10.0.1 up to but not including 10.21.3 are affected. The vulnerability allows reading files from sibling directories that share a common base path prefix due to improper pathname limitation. This issue is a regression of a previous vulnerability (CVE-2023-32309) and is fixed starting in version 10.21.3. The CVSS score is 4.3, indicating medium severity.

CVSS v3.1

Score 4.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Affected software

pymdown-extensions
pkg:pypi/pymdown-extensions
Affected versions
>=10.0.1 <10.21.3

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/23/2026, 22:41:31 UTC

Technical Analysis

PyMdown Extensions' SnippetPreprocessor.get_snippet_path() method uses a string-prefix containment check for path restriction when restrict_base_path is set to True. This check is insufficient, allowing an attacker to craft markdown snippet directives that read files outside the intended restricted directory by exploiting sibling paths with the same base path prefix. This vulnerability affects versions >=10.0.1 and <10.21.3 and was introduced as a regression of CVE-2023-32309. The issue is resolved in version 10.21.3.

Potential Impact

An attacker with the ability to control markdown snippet directives can read files from directories outside the intended restricted base path, potentially exposing sensitive information. The vulnerability does not allow modification or denial of service, only limited information disclosure. The CVSS score of 4.3 reflects a low-impact confidentiality loss with no integrity or availability impact.

Mitigation Recommendations

Upgrade pymdown-extensions to version 10.21.3 or later, where this path traversal vulnerability is fixed. There is no official patch advisory provided, but the fix is included starting in 10.21.3. Until upgrading, avoid enabling restrict_base_path or restrict usage of markdown snippet directives from untrusted sources.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-13T18:37:30.990Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a59276968715ace438892a8

Added to database: 07/16/2026, 18:48:09 UTC

Last enriched: 07/23/2026, 22:41:31 UTC

Last updated: 08/29/2026, 10:52:09 UTC

Views: 54

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses