CVE-2026-102991: Mako: Path traversal via drive-letter URI on Windows in TemplateLookup
On Windows, a TemplateLookup URI beginning with a drive designator (e.g. C:/../../secret.txt or C:\..\..\secret.txt) bypasses the directory traversal check in Template.__init__, allowing reads of files outside the configured template directory.
This is a third, independent instance of the root cause behind CVE-2026-41205 (the // prefix) and CVE-2026-44307 (the backslash form). Both of those fixes normalized a separator spelling. Neither addressed the other way posixpath and ntpath disagree: the drive designator. Both prior fixes remain effective on their own terms; this variant survives them for an independent reason.
References
- github.com/advisories/GHSA-5639-2j2p-m4mx
- github.com/sqlalchemy/mako/commit/000ed85e4e48771eff460bf4fc721fb43de80e08
- github.com/sqlalchemy/mako/issues/441
- github.com/sqlalchemy/mako/releases/tag/rel_1_4_2
- github.com/sqlalchemy/mako/security/advisories/GHSA-5639-2j2p-m4mx
- nvd.nist.gov/vuln/detail/CVE-2026-102991
Code Behaviors & Features
Detect and mitigate CVE-2026-102991 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →