CVE-2026-41205: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sqlalchemy mako
Mako is a template library written in Python. Prior to 1.3.11, TemplateLookup.get_template() is vulnerable to path traversal when a URI starts with // (e.g., //../../../secret.txt). The root cause is an inconsistency between two slash-stripping implementations. Any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to TemplateLookup.get_template(). This vulnerability is fixed in 1.3.11.
AI Analysis
Technical Summary
CVE-2026-41205 is a path traversal vulnerability (CWE-22) in the Mako template library used by SQLAlchemy. Specifically, TemplateLookup.get_template() mishandles URIs starting with double slashes, enabling attackers to bypass directory restrictions and access arbitrary files readable by the process. This occurs because of inconsistent handling of slashes in the path normalization logic. The vulnerability affects all versions prior to 1.3.11 and is resolved in version 1.3.11.
Potential Impact
An attacker who can supply untrusted input to TemplateLookup.get_template() may cause the application to read and render arbitrary files accessible by the process. This can lead to unauthorized disclosure of sensitive information contained in those files. The vulnerability does not require privileges or user interaction and has a high severity score of 7.7 (CVSS 4.0). There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade Mako to version 1.3.11 or later, where this path traversal vulnerability is fixed. Avoid passing untrusted input directly to TemplateLookup.get_template() as a best practice. Patch status is confirmed fixed in 1.3.11.
CVE-2026-41205: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sqlalchemy mako
Description
Mako is a template library written in Python. Prior to 1.3.11, TemplateLookup.get_template() is vulnerable to path traversal when a URI starts with // (e.g., //../../../secret.txt). The root cause is an inconsistency between two slash-stripping implementations. Any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to TemplateLookup.get_template(). This vulnerability is fixed in 1.3.11.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-41205 is a path traversal vulnerability (CWE-22) in the Mako template library used by SQLAlchemy. Specifically, TemplateLookup.get_template() mishandles URIs starting with double slashes, enabling attackers to bypass directory restrictions and access arbitrary files readable by the process. This occurs because of inconsistent handling of slashes in the path normalization logic. The vulnerability affects all versions prior to 1.3.11 and is resolved in version 1.3.11.
Potential Impact
An attacker who can supply untrusted input to TemplateLookup.get_template() may cause the application to read and render arbitrary files accessible by the process. This can lead to unauthorized disclosure of sensitive information contained in those files. The vulnerability does not require privileges or user interaction and has a high severity score of 7.7 (CVSS 4.0). There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade Mako to version 1.3.11 or later, where this path traversal vulnerability is fixed. Avoid passing untrusted input directly to TemplateLookup.get_template() as a best practice. Patch status is confirmed fixed in 1.3.11.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-18T02:51:52.974Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ea89bd87115cfb685d0b19
Added to database: 4/23/2026, 9:06:05 PM
Last enriched: 4/23/2026, 9:21:12 PM
Last updated: 4/24/2026, 12:08:09 AM
Views: 6
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.
External Links
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.