CVE-2026-61632: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in facelessuser pymdown-extensions
PyMdown Extensions versions up to and including 10.21.3 contain a path traversal vulnerability in the b64 extension. This flaw allows an attacker controlling Markdown input to cause the extension to read arbitrary files with certain image extensions outside the intended base directory. The file contents are then base64-encoded and included in the rendered output, potentially leaking sensitive information. The vulnerability is fixed in version 11.0.
AI Analysis
Technical Summary
The b64 extension of PyMdown Extensions (up to version 10.21.3) improperly limits pathname resolution when inlining images referenced by <img src="..."> tags. It joins the src attribute onto a configured base_path using os.path.normpath but does not verify that the resulting path remains within base_path. This allows path traversal via '../' sequences or absolute paths to read files outside the intended directory, provided the files have allowed image extensions (.png, .jpg, .jpeg, .gif, .svg). The contents of these files are base64-encoded into the rendered Markdown output, leading to disclosure of arbitrary file contents accessible by the process. This vulnerability is tracked as CVE-2026-61632 and is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
Potential Impact
An attacker who can supply or control Markdown content rendered with pymdownx.b64 enabled can read arbitrary files with certain image extensions accessible to the process outside the intended base directory. This results in information disclosure limited to readable image-extension files. There is no impact on integrity or availability. The CVSS 3.1 base score is 5.3 (medium severity), reflecting network attack vector, no privileges required, no user interaction, and limited confidentiality impact.
Mitigation Recommendations
Upgrade PyMdown Extensions to version 11.0 or later, where this path traversal vulnerability in the b64 extension has been fixed. Until then, avoid enabling the b64 extension on untrusted Markdown input or restrict input sources to trusted users only. Patch status is not explicitly stated in the vendor advisory, but the fix is included starting with version 11.0.
CVE-2026-61632: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in facelessuser pymdown-extensions
Description
PyMdown Extensions versions up to and including 10.21.3 contain a path traversal vulnerability in the b64 extension. This flaw allows an attacker controlling Markdown input to cause the extension to read arbitrary files with certain image extensions outside the intended base directory. The file contents are then base64-encoded and included in the rendered output, potentially leaking sensitive information. The vulnerability is fixed in version 11.0.
CVSS v3.1
Score 5.3medium
Affected software
facelessuser
pymdown-extensions
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The b64 extension of PyMdown Extensions (up to version 10.21.3) improperly limits pathname resolution when inlining images referenced by <img src="..."> tags. It joins the src attribute onto a configured base_path using os.path.normpath but does not verify that the resulting path remains within base_path. This allows path traversal via '../' sequences or absolute paths to read files outside the intended directory, provided the files have allowed image extensions (.png, .jpg, .jpeg, .gif, .svg). The contents of these files are base64-encoded into the rendered Markdown output, leading to disclosure of arbitrary file contents accessible by the process. This vulnerability is tracked as CVE-2026-61632 and is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
Potential Impact
An attacker who can supply or control Markdown content rendered with pymdownx.b64 enabled can read arbitrary files with certain image extensions accessible to the process outside the intended base directory. This results in information disclosure limited to readable image-extension files. There is no impact on integrity or availability. The CVSS 3.1 base score is 5.3 (medium severity), reflecting network attack vector, no privileges required, no user interaction, and limited confidentiality impact.
Mitigation Recommendations
Upgrade PyMdown Extensions to version 11.0 or later, where this path traversal vulnerability in the b64 extension has been fixed. Until then, avoid enabling the b64 extension on untrusted Markdown input or restrict input sources to trusted users only. Patch status is not explicitly stated in the vendor advisory, but the fix is included starting with version 11.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-10T17:38:57.111Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a750707bf8831d5395f5abb
Added to database: 08/06/2026, 22:13:27 UTC
Last enriched: 08/14/2026, 16:06:40 UTC
Last updated: 09/21/2026, 22:01:36 UTC
Views: 26
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.