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…

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

PyMdown Extensions versions from 10.0.1 up to but not including 10.21.3 contain a path traversal vulnerability in the SnippetPreprocessor component when the restrict_base_path option is enabled. This flaw allows markdown snippet directives to read files outside the intended restricted directory by exploiting a string-prefix containment check. The issue is a regression of a previous vulnerability (CVE-2023-32309) and was fixed in version 10.21.3. The vulnerability has a medium severity with a CVSS score of 4.3.

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/16/2026, 19:04:42 UTC

Technical Analysis

The vulnerability in facelessuser's pymdown-extensions affects the SnippetPreprocessor.get_snippet_path() method in pymdownx/snippets.py when restrict_base_path is set to True. The method uses a string-prefix containment check that is insufficient to properly restrict file access to the intended base directory. This allows an attacker to craft markdown snippet directives that read files from sibling directories sharing the same base_path prefix, effectively enabling path traversal. This regression reintroduces a previously fixed issue (CVE-2023-32309). The vulnerability affects versions from 10.0.1 up to but not including 10.21.3 and was resolved in version 10.21.3.

Potential Impact

An attacker can read files outside the intended restricted directory by exploiting the path traversal vulnerability in the snippet processing feature. This can lead to unauthorized disclosure of sensitive files accessible to the application user. The CVSS score of 4.3 reflects a medium impact primarily on confidentiality, with no impact on integrity or availability. There are no known exploits in the wild at this time.

Mitigation Recommendations

Upgrade pymdown-extensions to version 10.21.3 or later, where this path traversal vulnerability has been fixed. Since the vendor advisory indicates the issue is resolved in 10.21.3, applying this official fix is the recommended remediation. No other mitigation or temporary workaround is documented.

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/16/2026, 19:04:42 UTC

Last updated: 07/16/2026, 19:28:43 UTC

Views: 4

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