Skip to main content
Public proof of conceptFix available

CVE-2026-102991

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

A public proof of concept exists; no exploitation attested.

  • Published2026-09-30
  • Fixed in1.4.2
  • WeaknessCWE-22

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2026-09-3020:17CVE publishedNVD

Versions per branch

OSV
mako
BranchAffectedFixed in
1.4< 1.4.21.4.2

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • sqlalchemy mako
    Affected
    • = < 1.4.2no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-09-30

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • airflow-2MinimOSall versions · no fixed version listed
  • airflow-2Chainguardall versions · no fixed version listedand 1 other package
  • airflow-3CleanStartall versions · fixed in 3.0.6-r9
  • airflow-3CleanStartall versions · fixed in 3.1.8-r13
  • airflow-3CleanStartall versions · fixed in 3.2.1-r11
  • airflow-3CleanStartall versions · fixed in 3.3.2-r1
  • apache-supersetCleanStartall versions · fixed in 5.0.0-r11
  • jupyterhubMinimOSall versions · fixed in 6.0.1-r0

67 more package ranges on OSV.dev

Full record on NVD

Fix

  1. Update mako to 1.4.2

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
Published
2026-09-30
Last Modified
2026-09-30
NVD status
Deferred
GitHub Advisory
GHSA-5639-2j2p-m4mx

Frequently asked questions

What is CVE-2026-102991?

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.

Is CVE-2026-102991 actively exploited?

A proof-of-concept exploit exists for CVE-2026-102991, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2026-102991?

CVE-2026-102991 has a CVSS v3 base score of 6.5 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N.

Running mako? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record