Path traversal in Mako - CVE-2026-102991

 

Path traversal in Mako - CVE-2026-102991

Published: November 10, 2026


Vulnerability identifier: #VU164370
CSH Severity: Medium
CVSS v4: 8.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-102991
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

Mako

How to mitigate CVE-2026-102991

Install security update from vendor's website.

Mako - update to 1.4.2

External References

Related Security Bulletins