CVEfocus › CVE database › CVE-2026-102991

CVE-2026-102991Mako: Path traversal via drive-letter URI on Windows in TemplateLookup

CVSS 6.5 MediumEPSS 0.4% (higher than 27% of CVEs)Published 2026-09-30Updated 2026-09-30Assigner: GitHub_M

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.

CWE-22

What to do

Fixed builds are available from PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
7Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 26.04makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 24.04makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 22.04makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 20.04makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 18.04makoFix pendingUBUNTU-CVE-2026-102991
Ubuntu 16.04makoFix pendingUBUNTU-CVE-2026-102991
PyPI librarymakoFixed1.4.2GHSA-5639-2j2p-m4mx

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.