{"cve":"CVE-2026-102991","nvd":{"published":"2026-09-30T20:17:26.547","modified":"2026-09-30T20:17:26.973","status":"Deferred","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","score":6.5},"cwes":["CWE-22"],"references":["https://github.com/sqlalchemy/mako/commit/000ed85e4e48771eff460bf4fc721fb43de80e08","https://github.com/sqlalchemy/mako/issues/441","https://github.com/sqlalchemy/mako/releases/tag/rel_1_4_2","https://github.com/sqlalchemy/mako/security/advisories/GHSA-5639-2j2p-m4mx","https://github.com/sqlalchemy/mako/security/advisories/GHSA-5639-2j2p-m4mx"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:57:46.668721662+00:00"},"epss":{"cve":"CVE-2026-102991","score":0.00356,"percentile":0.29049,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-5639-2j2p-m4mx","url":"https://osv.dev/vulnerability/GHSA-5639-2j2p-m4mx","summary":"Mako: Path traversal via drive-letter URI on Windows in TemplateLookup","modified":"2026-10-15T14:55:45.473045835Z","packages":[{"ecosystem":"PyPI","name":"mako","purl":"pkg:pypi/mako","ranges":["<1.4.2"],"fixed":["1.4.2"]}]},{"id":"PYSEC-2026-4243","url":"https://osv.dev/vulnerability/PYSEC-2026-4243","summary":"Mako: Path traversal via drive-letter URI on Windows in TemplateLookup","modified":"2026-10-15T14:45:09.219391525Z","packages":[{"ecosystem":"PyPI","name":"mako","purl":"pkg:pypi/mako","ranges":["<1.4.2"],"fixed":["1.4.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}