CVE-2026-102991: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sqlalchemy mako
CVE-2026-102991 is a path traversal vulnerability in the Mako template library for Python, affecting versions prior to 1.4.2 on Windows. The issue arises from inconsistent path resolution methods used in TemplateLookup.get_template() and Template.__init__(), allowing an attacker to escape the configured template directory. This can lead to disclosure of process-readable files on the same volume and potential execution of attacker-controlled templates. The vulnerability is fixed in version 1.4.2.
AI Analysis
Technical Summary
Mako versions before 1.4.2 on Windows platforms have a path traversal vulnerability due to differing path resolution mechanisms: TemplateLookup.get_template() uses posixpath while Template.__init__() uses ntpath. This discrepancy allows specially crafted template URIs with drive designators to bypass directory restrictions, potentially exposing sensitive files or enabling execution of malicious templates. The vulnerability is addressed by correcting path resolution in version 1.4.2.
Potential Impact
An attacker who can supply template names or include paths may read arbitrary files accessible by the process on the same volume and may execute malicious templates if the targeted file contains Mako syntax. This can lead to information disclosure and partial integrity compromise. The CVSS score is 6.5 (medium severity), indicating a significant confidentiality impact with limited integrity impact and no availability impact.
Mitigation Recommendations
Upgrade to Mako version 1.4.2 or later, where this path traversal vulnerability is fixed. No other mitigation is specified or required once the update is applied.
CVE-2026-102991: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sqlalchemy mako
Description
CVE-2026-102991 is a path traversal vulnerability in the Mako template library for Python, affecting versions prior to 1.4.2 on Windows. The issue arises from inconsistent path resolution methods used in TemplateLookup.get_template() and Template.__init__(), allowing an attacker to escape the configured template directory. This can lead to disclosure of process-readable files on the same volume and potential execution of attacker-controlled templates. The vulnerability is fixed in version 1.4.2.
CVSS v3.1
Score 6.5medium
Affected software
sqlalchemy
mako
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mako versions before 1.4.2 on Windows platforms have a path traversal vulnerability due to differing path resolution mechanisms: TemplateLookup.get_template() uses posixpath while Template.__init__() uses ntpath. This discrepancy allows specially crafted template URIs with drive designators to bypass directory restrictions, potentially exposing sensitive files or enabling execution of malicious templates. The vulnerability is addressed by correcting path resolution in version 1.4.2.
Potential Impact
An attacker who can supply template names or include paths may read arbitrary files accessible by the process on the same volume and may execute malicious templates if the targeted file contains Mako syntax. This can lead to information disclosure and partial integrity compromise. The CVSS score is 6.5 (medium severity), indicating a significant confidentiality impact with limited integrity impact and no availability impact.
Mitigation Recommendations
Upgrade to Mako version 1.4.2 or later, where this path traversal vulnerability is fixed. No other mitigation is specified or required once the update is applied.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-29T20:46:08.334Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6abd6b1e2a4e24523d869f95
Added to database: 09/30/2026, 20:03:42 UTC
Last enriched: 09/30/2026, 20:18:30 UTC
Last updated: 10/01/2026, 04:25:28 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.