# CVE-2026-41205: Mako: Path traversal via double-slash URI prefix in TemplateLookup

> Attackers can read arbitrary files by passing double-slash URIs to Mako's TemplateLookup, exposing sensitive data to anyone using the library.

- **Severity:** High 7.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Apr 2026
- **Updated:** 20 May 2026
- **Also known as:** AZL-83606, CLEANSTART-2026-QL06505, CLEANSTART-2026-TN41416, CLSA-2026-1791547905, DEBIAN-CVE-2026-41205, ECHO-0e1e-5a56-ed2d, GHSA-v92g-xgxw-vvmm, MINI-2g53-5wvv-f8cq, MINI-59q5-m3jf-chw3, MINI-688j-xfgj-8jf8, MINI-c8mp-fxq5-j6m2, MINI-w3rv-59j8-cmm9, MINI-xj72-mp2j-v4fw, PYSEC-2026-88, ROOT-APP-PYPI-CVE-2026-41205, SUSE-SU-2026:1819-1, SUSE-SU-2026:1820-1, SUSE-SU-2026:21426-1, UBUNTU-CVE-2026-41205, USN-8234-1, openSUSE-SU-2026:10616-1, openSUSE-SU-2026:20645-1

## What is CVE-2026-41205?

CVE-2026-41205 is a high-severity path traversal vulnerability in sqlalchemy mako, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-41205?

3 open source packages ship an affected version, including mako and Mako. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mako` | PyPI | All versions | 1.3.11 |
| `mako` | PyPI | All versions | 1.3.11 |
| `Mako` | PyPI | All versions | 1.3.11 |
| `python-Mako` | openSUSE:Tumbleweed | All versions | 1.3.11-1.1 |

Products: Sqlalchemy Mako.

## How do I fix CVE-2026-41205?

Upgrade mako to 1.3.11 or later.

## Is CVE-2026-41205 being exploited?

There is no known exploitation of CVE-2026-41205 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41205 and fix it if it is affected.

What it is: CVE-2026-41205 is a high-severity path traversal vulnerability in sqlalchemy mako, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41205 in the wild and no public exploit code.

Affected packages and fixed versions:
- mako (PyPI): affected all versions; fixed in 1.3.11
- mako (PyPI): affected all versions; fixed in 1.3.11
- Mako (PyPI): affected all versions; fixed in 1.3.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41205/ (Markdown: https://insights.sbomify.com/CVE-2026-41205/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41205
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41205
- OSV: https://osv.dev/vulnerability/CVE-2026-41205

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41205/
Summaries are generated and may contain mistakes; the official description above is the record.
