Skip to main content

Mako CVE-2026-41205

| EUVDEUVD-2026-25279 HIGH
Path Traversal (CWE-22)
2026-04-23 security-advisories@github.com GHSA-v92g-xgxw-vvmm
7.7
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit template URI with '//' prefix
  2. Exploit
    Bypass leading-slash normalization mismatch
  3. Execution
    Path traversal in get_template()
  4. Impact
    Read arbitrary process-readable file

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The application must pass attacker-controlled input directly into TemplateLookup.get_template(), and the malicious URI must begin with two or more leading slashes (e.g. //../../../secret.txt) to trigger the slash-stripping inconsistency; single-slash inputs are already blocked. Impact is limited to reading files the Mako process can access (arbitrary file read, no write or code execution). Key limiting factors: the double-slash prefix must survive to the library, so HTTP-based exploitation is blocked when the fronting server normalizes paths - notably CPython's BaseHTTPRequestHandler since gh-87389 - meaning realistic exploitation needs a non-normalizing HTTP server or a non-HTTP input channel, plus an app that forwards raw user input to get_template().

Impact

The signals are consistent and point to a real but conditional issue rather than an internet-wide emergency. The vendor CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N, VC:H, VI/VA:N) reflects unauthenticated network reach with confidentiality-only impact, and SSVC agrees on partial technical impact with Exploitation=none and Automatable=no. EPSS is 0.05% (14th percentile) and the CVE is not in CISA KEV, so there is no evidence of active exploitation - the E:P exploit-maturity flag denotes proof-of-concept only. The most important caveat is that the CVSS network vector overstates practical exposure: exploitation requires an application to pass untrusted, un-normalized input directly into get_template(), and the advisory notes that HTTP delivery is neutralized by CPython's BaseHTTPRequestHandler double-slash normalization (gh-87389). So realistic risk is limited to apps using non-normalizing HTTP servers or non-HTTP input paths - a targeted, configuration-dependent scenario, not commodity mass exploitation.

Exploit ScenarioDerived

An application exposes a template-name parameter (e.g. a page or theme selector) and passes it unmodified to TemplateLookup.get_template(). An unauthenticated attacker requests a value like //../../../../etc/passwd (or //../../app/config/settings.py) and receives the target file's contents rendered back as the 'template', harvesting credentials, secret keys, or source code. Proof-of-concept behavior is demonstrated by the vendor's added regression tests (double- and triple-slash prefixes), and the CVSS E:P flag reflects proof-of-concept maturity.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Arbitrary file read in Mako (the Python template library maintained under the SQLAlchemy project) affects all versions prior to 1.3.11, where TemplateLookup.get_template() mishandles URIs beginning with a double slash (e.g. //../../../etc/passwd). Because get_template() strips all leading slashes while Template.__init__ stripped only one, the 'relative outside of root' safety check is bypassed, letting any file readable by the process be returned as rendered template content when an application feeds untrusted input into get_template(). CVSS 4.0 rates it 7.7 (confidentiality-only); it is not in CISA KEV and EPSS is very low (0.05%), but the CVSS exploit-maturity flag E:P and the vendor's published test cases indicate proof-of-concept exploit code exists.

RemediationAI

Vendor-released patch: upgrade Mako to 1.3.11 or later (pip install --upgrade 'Mako>=1.3.11'); the fix is commit e05ac61989a7fb9dd7dcde6cfd72dc48328719a3 and is documented in advisory GHSA-v92g-xgxw-vvmm (https://github.com/sqlalchemy/mako/security/advisories/GHSA-v92g-xgxw-vvmm). If you cannot upgrade immediately, the actionable compensating control is to stop passing untrusted input straight into TemplateLookup.get_template(): validate or allowlist template URIs, and reject or strip any URI whose normalized form begins with a slash or contains '..' before lookup (side effect: legitimate templates referenced with leading slashes must be normalized consistently). Where templates are served over HTTP, front the app with a server or proxy that normalizes double-slash paths (CPython's BaseHTTPRequestHandler already does this per gh-87389), accepting that this only closes the HTTP delivery path and not direct-API misuse. Running the process under least privilege limits which files an attacker can read but does not fix the traversal.

Affected VersionsENISA

mako < 1.3.11

Affected Packages

pypi mako fix: 1.3.11

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mako is a widely used Python server-side templating engine (CPE cpe:2.3:a:sqlalchemy:mako). The flaw is a classic CWE-22 Improper Limitation of a Pathname to a Restricted Directory (path traversal) caused by an inconsistency between two leading-slash normalizers on the same URI. TemplateLookup.get_template() strips every leading slash via re.sub(r'^\/+', ''), turning '//../../../../etc/passwd' into '../../../../etc/passwd', which resolves against the template directory with posixpath.join and locates the target file. Template.__init__ then stripped only one slash, producing '/../../../../etc/passwd', which normpath collapses to an absolute '/etc/passwd'; the guard u_norm.startswith('..') returns False, so the directory-escape check is silently skipped. The upstream fix replaces the single-slash slice with lstrip('/') so both code paths agree.

Know when Mako gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 7.7 HIGH
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
vuln.today AI 5.9 MEDIUM

Unauthenticated file read (C:H, I/A:N), but AC:H because exploitation requires an app that forwards raw input to get_template() and an HTTP path that isn't normalized.

3.1 AV:N/AC:H/PR:N/UI:N/S:N/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat 5.9 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Patch released
Apr 28, 2026 - 19:14 nvd
Patch available
Patch available
Apr 23, 2026 - 21:01 EUVD
CVE Published
Apr 23, 2026 - 19:17 nvd
HIGH 7.7

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Mako versions prior to 1.3.11 contain an arbitrary file read vulnerability that permits attackers to bypass security checks and access files readable by the application process, potentially exposing sensitive configurations, credentials, and source code. Organizations running affected versions face material data breach risk and must patch immediately.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% exploitable
Prevalence
High
widely used Python template engine, bundled transitively via Alembic
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

SUSE

Severity: High
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy