# CVE-2026-44307: SQLAlchemy Mako path traversal on Windows via backslash URIs

Source: https://junglewise.ai/threats/cve-2026-44307-mako-path-traversal-via-backslash-uri-on-windows-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-12. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-44307 · Severity: high · CVSS 4 · Published 2026-05-12

Mako is a popular Python library used to generate web pages and other text documents from templates. A security flaw in how the library handles file paths on Windows systems allows an attacker to bypass security checks and read sensitive files from the server. This could lead to the exposure of configuration files, source code, or other private data if the application allows user-controlled input to determine which template to load.

Technologies: [Mako (PyPI)](https://junglewise.ai/threats/technologies/mako). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-44307 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-44307 being exploited in the wild.

**How severe is CVE-2026-44307?** High severity, with a CVSS score of 4, published 12 May 2026.

**Which products and versions are affected?** Mako (PyPI) <= 1.3.11, ECOSYSTEM:introduced=0,fixed=1.3.12.

**Is there a fix for CVE-2026-44307?** Yes. Mako (PyPI): upgrade to 1.3.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-44307 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-44307?** Check whether you run Mako (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Mako (PyPI): upgrade to 1.3.12 or later

  ```sh
  pip install "Mako>=1.3.12"
  ```


## Technical details

A path traversal vulnerability exists in Mako's template resolution logic when running on Windows. The root cause is an inconsistency between 'posixpath' (used for URI normalization) and 'os.path' (which defaults to 'ntpath' on Windows). While 'posixpath' treats backslashes as literal characters, 'ntpath' and the underlying Windows file system treat them as path separators. An attacker can use backslash-based traversal sequences (e.g., '\..\') to bypass 'startswith("..")' security checks and 'posixpath.normpath' filters. This allows unauthorized reading of files outside the designated template directory. The issue is resolved in version 1.3.12 by normalizing backslashes to forward slashes early in the URI processing pipeline.

## Affected products

- SQLAlchemy Mako < 1.3.12

## Identifiers

- CVE-2026-44307
- GHSA-2h4p-vjrc-8xpq
- PYSEC-2026-2617

## Timeline

- 2026-04-28: patched: Fix committed and version 1.3.12 released.
- 2026-05-12: advisory: NVD and GitHub Security Advisory published.

## References

- [https://github.com/sqlalchemy/mako/commit/72e10c573ca0fbcbddd4455abca8ce92a61780d7](https://github.com/sqlalchemy/mako/commit/72e10c573ca0fbcbddd4455abca8ce92a61780d7)
- [https://github.com/sqlalchemy/mako/issues/435](https://github.com/sqlalchemy/mako/issues/435)
- [https://github.com/sqlalchemy/mako/releases/tag/rel_1_3_12](https://github.com/sqlalchemy/mako/releases/tag/rel_1_3_12)
- [https://github.com/sqlalchemy/mako/security/advisories/GHSA-2h4p-vjrc-8xpq](https://github.com/sqlalchemy/mako/security/advisories/GHSA-2h4p-vjrc-8xpq)

## Related threats

- [Mako template library path traversal via drive designator on Windows](https://junglewise.ai/threats/cve-2026-102991-mako-is-a-template-library-written-in-python-prior-to-1-4-2-on)
- [SQLAlchemy Mako path traversal in TemplateLookup](https://junglewise.ai/threats/cve-2026-41205-sqlalchemy-mako-path-traversal-in-templatelookup)
- [mako is vulnerable to Regular Expression Denial of Service](https://junglewise.ai/threats/cve-2022-40023-mako-is-vulnerable-to-regular-expression-denial-of-service)
- [Mako contains Cross-site Scripting vulnerability](https://junglewise.ai/threats/cve-2010-2480-mako-contains-cross-site-scripting-vulnerability)
