Skip to content

← Public intelligence

PyPI package

mako

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

5 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.5PyPIAmendedPublished

    Mako: Path traversal via drive-letter URI on Windows in TemplateLookup

    CVE-2026-102991 · GHSA-5639-2j2p-m4mx

    Affected
    • PyPI mako <= 1.4.1
    Fixed in
    1.4.2· Vendor fix available
    Issue
    On Windows, a TemplateLookup URI beginning with a drive designator (e.g. C:/../../secret.txt or C:\..\..\secret.txt) bypasses the directory traversal check in Template.init, allowing reads of files outside the configured template directory. This is a third, independent instance of the root cause behind CVE-2026-41205 (the // prefix) and CVE-2026-44307 (the backslash form). Both of those fixes normalized a separator spelling. Neither addressed the other way posixpath and ntpath disagree: the drive designator. Both prior fixes remain effective on their own terms; this variant survives them for an independent reason. Details The root cause is the same posixpath / os.path mismatch: resolution is done with posixpath, confinement is checked with os.path, which is ntpath on Windows. posixpath has no concept of a drive, so it treats C: as an ordinary path component; the .. segments pop C: and then escape the template root. ntpath, by contrast, splits the drive off and treats the…

    Recommended action: Upgrade to 1.4.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. High, CVSS 8.7PyPIAmendedPublished

    Mako vulnerable to path traversal via backslash URI on Windows in TemplateLookup

    CVE-2026-44307 · GHSA-2h4p-vjrc-8xpq

    Affected
    • PyPI mako <= 1.3.11
    Fixed in
    1.3.12· Vendor fix available
    Issue
    On Windows, a URI using backslash traversal (e.g. \..\..\ secret.txt) bypasses the directory traversal check in Template.init and the posixpath-based normalization in TemplateLookup.gettemplate(), allowing reads of files outside the configured template directory. Details The root cause is a mismatch between posixpath (used for URI normalization in gettemplate()) and os.path (used for file access via os.path.isfile() and validation via os.path.normpath() in Template.init). On Windows, os.path is ntpath, which treats \ as a path separator, while posixpath treats it as a literal character. The vulnerability chain: 1. gettemplate() strips only leading / via re.sub(r"^\/+", "", uri) and normalizes with posixpath — backslash \ is treated as a literal character, so \..\ secret.txt passes through with .. undetected. 2. Template.init() validation uses os.path.normpath() — on Windows this resolves \..\ secret.txt to \secret.txt, which does not start with .., so the startswith("..")…

    Recommended action: Upgrade to 1.3.12 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 7.7PyPIAmendedPublished

    Mako: Path traversal via double-slash URI prefix in TemplateLookup

    CVE-2026-41205 · GHSA-v92g-xgxw-vvmm

    Affected
    • PyPI mako <= 1.3.10
    Fixed in
    1.3.11· Vendor fix available
    Issue
    TemplateLookup.gettemplate() 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: - Template.init strips one leading / using if/slice - TemplateLookup.gettemplate() strips all leading / using re.sub(r"^\/+", "") When a URI like //../../../../etc/passwd is passed: 1. gettemplate() strips all / → ../../../../etc/passwd → file found via posixpath.join(dir, u) 2. Template.init strips one / → /../../../../etc/passwd → normpath → /etc/passwd 3. /etc/passwd.startswith(..) → False → check bypassed Impact Arbitrary file read: any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to TemplateLookup.gettemplate(). Note: this is exploitable at the library API level. HTTP-based exploitation is mitigated by Python's BaseHTTPRequestHandler which normalizes double-slash prefixes since CPython gh-87389.…

    Recommended action: Upgrade to 1.3.11 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 8.7PyPIAmendedPublished

    mako is vulnerable to Regular Expression Denial of Service

    CVE-2022-40023 · GHSA-v973-fxgf-6xhp

    Affected
    • PyPI mako < 1.2.2
    Fixed in
    1.2.2· Vendor fix available
    Issue
    Sqlalchemy mako before 1.2.2 is vulnerable to Regular expression Denial of Service when using the Lexer class to parse. This also affects babelplugin and linguaplugin.

    Recommended action: Upgrade to 1.2.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. Medium, CVSS 5.3PyPIAmendedPublished

    Mako contains Cross-site Scripting vulnerability

    CVE-2010-2480 · GHSA-7q8x-38mc-p84f

    Affected
    • PyPI mako < 0.3.4
    Fixed in
    0.3.4· Vendor fix available
    Issue
    Mako before 0.3.4 relies on the cgi.escape function in the Python standard library for cross-site scripting (XSS) protection, which makes it easier for remote attackers to conduct XSS attacks via vectors involving single-quote characters and a JavaScript onLoad event handler for a BODY element.

    Recommended action: Upgrade to 0.3.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →