CVE-2023-32309
Python vulnerability analysis and mitigation

Overview

PyMdown Extensions, a set of extensions for the Python-Markdown project, was found to contain a critical vulnerability (CVE-2023-32309) that allows arbitrary file read through the snippets extension. The vulnerability affects versions 1.5 through 9.11 and was patched in version 10.0. The issue was discovered and disclosed on May 15, 2023 (GitHub Advisory).

Technical details

The vulnerability exists in the Snippets extension's implementation of the basepath option, which is vulnerable to Directory Traversal. The issue occurs in the getsnippet_path(self, path) function (lines 155-174 in snippets.py). An attacker can exploit this by using include file syntax such as --8<--"/etc/passwd" or --8<--"/proc/self/environ", or by using relative paths like --8<-- "../../../../etc/passwd" to access files outside the specified base paths (GitHub Advisory).

Impact

The vulnerability allows any readable file on the host where the plugin is executing to have its content exposed. While the Snippets extension is designed for processing known content on the backend under host control, if accidentally enabled for user-facing content, it could lead to exposure of sensitive information (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 10.0, which introduces a new option 'restrictbasepath' that ensures snippets are actual children of the base path by default. Users are advised to upgrade to version 10.0 or later. For those unable to upgrade, it is recommended to restrict relative paths by filtering input and avoid using Snippets to process user-facing, dynamic content (GitHub Patch).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management