Description
Mako is a template library written in Python. Prior to 1.3.11, TemplateLookup.get_template() is vulnerable to path traversal when a URI starts with // (e.g., //../../../secret.txt). The root cause is an inconsistency between two slash-stripping implementations. Any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to TemplateLookup.get_template(). This vulnerability is fixed in 1.3.11.
Published: 2026-04-23
Score: 7.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote File Disclosure
Action: Apply Patch
AI Analysis

Impact

Mako, a Python template library, contains a path traversal flaw in TemplateLookup.get_template() before version 1.3.11. When a template URI begins with a double slash (//), two different slash‑stripping mechanisms diverge, allowing an attacker to craft a URI such as //../../../secret.txt that resolves outside the configured template directory. Any file readable by the running process can be retrieved and rendered as template content, exposing sensitive data to unauthenticated users. The weakness is a classic directory traversal (CWE‑22) and can lead to confidentiality compromise at a system level.

Affected Systems

The vulnerability affects the Mako library distributed by the SQLAlchemy group. Any installation of Mako prior to version 1.3.11 is affected. Administrators should verify whether their applications depend on Mako and determine the exact version in use. The fix is implemented in Mako 1.3.11 and newer releases.

Risk and Exploitability

The CVSS score of 7.7 indicates a high severity impact. The EPSS score of less than 1% suggests that current exploitation activity is low but still possible. The vulnerability is not listed in the CISA KEV catalog. Attackers are likely to exploit this flaw from a remote web application that trusts user-supplied URIs and forwards them to TemplateLookup.get_template(); the attack does not require elevated privileges and can retrieve any file readable by the application process.

Generated by OpenCVE AI on April 28, 2026 at 07:31 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mako to version 1.3.11 or later
  • Validate or sanitize any user input that is passed to TemplateLookup.get_template() to prevent double‑slash prefixes
  • Configure TemplateLookup to restrict allowed directories and deny access to files outside the intended template path

Generated by OpenCVE AI on April 28, 2026 at 07:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-v92g-xgxw-vvmm Mako: Path traversal via double-slash URI prefix in TemplateLookup
Ubuntu USN Ubuntu USN USN-8234-1 Mako vulnerability
History

Wed, 20 May 2026 02:15:00 +0000


Tue, 28 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:sqlalchemy:mako:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Mon, 27 Apr 2026 19:30:00 +0000

Type Values Removed Values Added
First Time appeared Sqlalchemy
Sqlalchemy mako
Vendors & Products Sqlalchemy
Sqlalchemy mako

Sun, 26 Apr 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}

threat_severity

Moderate


Thu, 23 Apr 2026 21:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 23 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
Description Mako is a template library written in Python. Prior to 1.3.11, TemplateLookup.get_template() is vulnerable to path traversal when a URI starts with // (e.g., //../../../secret.txt). The root cause is an inconsistency between two slash-stripping implementations. Any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to TemplateLookup.get_template(). This vulnerability is fixed in 1.3.11.
Title Mako: Path traversal via double-slash URI prefix in TemplateLookup
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-20T01:32:18.382Z

Reserved: 2026-04-18T02:51:52.974Z

Link: CVE-2026-41205

cve-icon Vulnrichment

Updated: 2026-04-23T20:20:55.667Z

cve-icon NVD

Status : Modified

Published: 2026-04-23T19:17:29.270

Modified: 2026-05-20T02:16:36.087

Link: CVE-2026-41205

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-04-23T18:52:24Z

Links: CVE-2026-41205 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-28T07:45:26Z

Weaknesses