SecurityContext

CVE-2026-102991: Mako - Template Injection

  • Cve: CVE-2026-102991
  • Name: Mako - Template Injection
  • Description: Mako is a template library written in Python. Prior to 1.4.2, on Windows, TemplateLookup.get_template() in mako/lookup.py resolves template URIs with posixpath, while Template.__init__() in mako/template.py validates them with os.path, which uses ntpath. A URI beginning with a drive designator causes ntpath to absorb the traversal segments before the leading dot-dot check, while posixpath resolution can escape the configured template directory. An application that passes attacker-controlled template names or include paths can disclose process-readable files on the same volume, and a targeted file containing Mako template syntax may also be parsed and executed as a template. Raw URL paths are generally normalized before reaching this form, but query strings, form or JSON bodies, route parameters, and dynamic include expressions can preserve it. This issue is fixed in version 1.4.2.
  • Impact: Attackers can disclose process-readable files and execute arbitrary templates, potentially leading to information disclosure and remote code execution.
  • Remediation: Update to version 1.4.2 or later.
  • Vulnerability type: template_injection
  • Vulnerability impact: information_disclosure, remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.5
  • Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
  • Epss score: 0.00356
  • Epss percentile: 0.29692
  • Assignee: [email protected]
  • Published at: 2026-09-30T20:17:26Z
  • Age in days: 55
  • Modified at: 2026-09-30T20:17:26Z
  • Patch available: yes
  • References total: 4
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-102991
  • Nvd status: deferred
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-22Improper Limitation of a Pathname to a Restricted Directory

References

Same in every row:

  • Source: nvd
  • Tags:
Url
https://github.com/sqlalchemy/mako/commit/000ed85e4e48771eff460bf4fc721fb43de80e08
https://github.com/sqlalchemy/mako/issues/441
https://github.com/sqlalchemy/mako/releases/tag/rel_1_4_2
https://github.com/sqlalchemy/mako/security/advisories/GHSA-5639-2j2p-m4mx

Products

ProductAffectedPlatform boundSourcesUrl
sqlalchemy:mako< 1.4.2nocna_alias_text/v1/products/sqlalchemy/mako

Projects

RepositoryLink kindsIndexedUrl
sqlalchemy/makocommit, fix, issues, package, releases, security_advisoryyes/v1/repositories/sqlalchemy/mako

Index

  • Repositories: 352
  • Repositories high signal: 235
  • Packages: 1

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts