Path traversal in Mako - CVE-2026-102991
Published: November 10, 2026
Vulnerability details
The vulnerability allows a remote attacker to disclose files readable by the application on the template directory's volume and potentially execute code from files containing Mako/Python template syntax.
The vulnerability exists due to path traversal in Mako's TemplateLookup and Template.__init__ when resolving user-controlled paths with posixpath but validating confinement with ntpath on Windows. A remote attacker can supply drive-letter paths such as C:/../../secret.txt through template names or include paths to bypass directory confinement and load files outside the configured template directory.