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() improperly limits pathnames when the URI begins with double slashes, enabling an attacker to retrieve arbitrary files accessible to the process by exploiting inconsistent slash-stripping logic. This can lead to unauthorized file disclosure if untrusted input is passed directly to get_template(). The vulnerability affects Mako versions before 1.3.11 and is resolved in version 1.3.11.
Potential Impact
An attacker can exploit this vulnerability to read any file that the application process has permission to access, potentially exposing sensitive information. The vulnerability does not require authentication or user interaction and has a high severity score of 7.7. There is no indication of 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 an additional precaution. Patch status is confirmed by the vendor stating the issue is 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.
CVSS v4.0
Score 7.7high
Weaknesses
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() improperly limits pathnames when the URI begins with double slashes, enabling an attacker to retrieve arbitrary files accessible to the process by exploiting inconsistent slash-stripping logic. This can lead to unauthorized file disclosure if untrusted input is passed directly to get_template(). The vulnerability affects Mako versions before 1.3.11 and is resolved in version 1.3.11.
Potential Impact
An attacker can exploit this vulnerability to read any file that the application process has permission to access, potentially exposing sensitive information. The vulnerability does not require authentication or user interaction and has a high severity score of 7.7. There is no indication of 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 an additional precaution. Patch status is confirmed by the vendor stating the issue is 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: 5/20/2026, 6:17:25 PM
Last updated: 6/7/2026, 7:10:53 PM
Views: 93
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.