Mako
Mako: Path traversal via double-slash URI prefix in TemplateLookup
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.7high · scored by CNA · CWE-22
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
sqlalchemy mako
- < 1.3.11
Fixed in 1.3.11
Mitigation
Upgrade mako to 1.3.11 or later.
References
- Vendor advisory github.com/sqlalchemy/mako/security/advisories…
- Patch github.com/sqlalchemy/mako/commit/e05ac61989a7…
- Release notes github.com/sqlalchemy/mako/releases/tag/rel_1_…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.