Mako: Path traversal via drive-letter URI on Windows in TemplateLookup
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · Low · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sqlalchemy | mako | before 1.4.2 | 1.4.2 | Patch available | CNA |
| — | Mako (PyPI) | before 1.4.2 | 1.4.2 | Patch available | GHSA-5639-2j2p-m4mx |
- mako Vendorsqlalchemy Affected before 1.4.2 Fixed in 1.4.2 Patch available CNA
- Mako (PyPI) Vendor— Affected before 1.4.2 Fixed in 1.4.2 Patch available GHSA-5639-2j2p-m4mx
Remediation
- Fix · CNA mako (sqlalchemy) Fixed in 1.4.2
- Fix · GHSA-5639-2j2p-m4mx Mako (PyPI) Fixed in 1.4.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-102991
- 2026-10-06 Alias added: GHSA-5639-2j2p-m4mx
- 2026-10-06 Fix available: PyPI/[email protected] · GHSA-5639-2j2p-m4mx
- 2026-10-06 CVSS score added · GHSA-5639-2j2p-m4mx
- 2026-10-06 Weakness changed · GHSA-5639-2j2p-m4mx
- 2026-10-06 6 new references · GHSA-5639-2j2p-m4mx
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
- 2026-11-06 Affected versions changed · Red Hat
References
More sqlalchemy vulnerabilities
- TI-2019-05082 SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter. CVSS 3.1CRITICAL 9.8
- TI-2026-32275 Mako: Path traversal via backslash URI on Windows in TemplateLookup CVSS 4.0HIGH 8.7
- TI-2019-05329 SQLAlchemy 1.2.17 has SQL Injection when the group_by parameter can be controlled. CVSS 3.1HIGH 7.8
- TI-2012-00742 Multiple SQL injection vulnerabilities in SQLAlchemy before 0.7.0b4, as used in Keystone… CVSS 2.0HIGH 7.5
- TI-2022-18951 Sqlalchemy mako before 1.2.2 is vulnerable to Regular expression Denial of Service when… CVSS 3.1HIGH 7.5
- TI-2026-29824 Mako: Path traversal via double-slash URI prefix in TemplateLookup CVSS 4.0HIGH 7.7
Sources
- CVE-2026-102991 · CVE Program
- CVE-2026-102991 · NVD
- FIRST EPSS
- GHSA-5639-2j2p-m4mx · GitHub Advisory Database · CC BY 4.0
- CVE-2026-102991 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences