PT-2026-42035

CVE-2026-46338

·

Published

2026-05-19

·

Updated

2026-10-24

Description by

CVSS 3.1
4.3
Medium
MetricsAV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions pymdown-extensions versions 10.0.1 through 10.21.2
Description A regression in the pymdownx.snippets extension allows for arbitrary file read on the host system where the build runs. When restrict base path is set to True, the software uses a string-prefix comparison that fails to enforce directory boundaries. This allows a markdown snippet directive to access files in sibling directories that share the same prefix as the base path. For example, if the base path is /x/docs, an attacker can read files from /x/docs internal/ or /x/docs.bak/ by using path traversal. This issue occurs within the get snippet path() function in pymdownx/snippets.py due to the use of the startswith() method on the filename variable without ensuring a trailing directory separator.
Recommendations Update pymdown-extensions to a version later than 10.21.2. As a temporary mitigation, restrict the use of the pymdownx.snippets extension or ensure that the base path is configured in a way that no sibling directories share the same string prefix.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-62Q4-447F-WV8H
OESA-2026-4182
OESA-2026-4183
OESA-2026-4184
PYSEC-2026-2999
Found an issue in the description? Have something to add? Feel free to write us 👾