PT-2026-38303 · Pypi · Mako
Published
2026-05-06
·
Updated
2026-05-18
·
CVE-2026-44307
CVSS v4.0
8.7
High
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Name of the Vulnerable Software and Affected Versions
Mako (affected versions not specified)
Description
On Windows, a path traversal issue exists where URIs using backslash traversal (e.g.,
....secret.txt) can bypass directory traversal checks in Template. init and normalization in TemplateLookup.get template(). This occurs due to a mismatch between posixpath, which treats backslashes as literal characters, and os.path (specifically ntpath on Windows), which treats them as path separators. An attacker can exploit this by passing user-controlled template names or include paths to the get template() function, potentially leading to the disclosure of files outside the configured template directory. If the accessed file contains Mako or Python template syntax, it may be parsed and executed.Recommendations
Normalize backslashes to forward slashes early in the URI processing pipeline, before any path operations, to ensure consistent behavior across platforms.
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Mako