mako/lookup.py resolves template URIs with posixpath · Prior to 1.4.2, on Windows, TemplateLookup.get_template()
Affects makoSource GCVE Database
Not known to be exploited · CVSS 6.5 Medium · fixed in 1.4.2 : update mako when convenient.
Data as of 24 Nov 2026, 22:28 UTC
- Patch
- Available – fixed in 1.4.2
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 30 Sep 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10makopkg:deb/ubuntu/mako?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSmakopkg:deb/ubuntu/mako?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSmakopkg:deb/ubuntu/mako?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSmakopkg:deb/ubuntu/mako?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu Pro 20.04 LTSmakopkg:deb/ubuntu/mako?arch=source&distro=esm-infra/focalOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTSmakopkg:deb/ubuntu/mako?arch=source&distro=esm-infra/bionicOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
Mako is a template library written in Python. Prior to 1.4.2, on Windows, TemplateLookup.get_template() in mako/lookup.py resolves template URIs with posixpath, while Template.__init__() in mako/template.py validates them with os.path, which uses ntpath. A URI beginning with a drive designator causes ntpath to absorb the traversal segments before the leading dot-dot check, while posixpath resolution can escape the configured template directory. An application that passes attacker-controlled template names or include paths can disclose process-readable files on the same volume, and a targeted file containing Mako template syntax may also be parsed and executed as a template. Raw URL paths are generally normalized before reaching this form, but query strings, form or JSON bodies, route parameters, and dynamic include expressions can preserve it. This issue is fixed in version 1.4.2.
References
- ubuntu.com/security/CVE-2026-102991 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-102991 (opens in a new tab)
- github.com/sqlalchemy/mako/security/advisories/GHSA-5639-2j2p-m4mx (opens in a new tab)
- github.com/sqlalchemy/mako/issues/441 (opens in a new tab)
- github.com/sqlalchemy/mako/commit/000ed85e4e48771eff460bf4fc721fb43de80e08 (opens in a new tab)
- github.com/sqlalchemy/mako/releases/tag/rel_1_4_2 (opens in a new tab)