Skip to main content

CVE-2026-102991: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sqlalchemy mako

0
Medium
VulnerabilityCVE-2026-102991cvecve-2026-102991cwe-22
Published: 09/30/2026 (09/30/2026, 19:47:07 UTC)
Source: CVE Database V5
Vendor/Project: sqlalchemy
Product: 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

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N

Affected software

sqlalchemy

mako

Affected versions
<1.4.2
mako
pkg:pypi/mako
Affected versions
<1.4.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/30/2026, 20:18:30 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses