{"answers":{"affected":"3 open source packages ship an affected version, including mako and Mako.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102991 exists.","fix":"Upgrade mako to 1.4.2 or later.","what":"CVE-2026-102991 is a medium-severity path traversal vulnerability in sqlalchemy mako, published on 30 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-102991 and fix it if it is affected.\n\nWhat it is: CVE-2026-102991 is a medium-severity path traversal vulnerability in sqlalchemy mako, published on 30 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-102991 exists.\n\nAffected packages and fixed versions:\n- mako (PyPI): affected all versions; fixed in 1.4.2\n- mako (PyPI): affected all versions; fixed in 1.4.2\n- Mako (PyPI): affected all versions; fixed in 1.4.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-102991/ (Markdown: https://insights.sbomify.com/CVE-2026-102991/index.md)","id":"CVE-2026-102991","markdown":"https://insights.sbomify.com/CVE-2026-102991/index.md","name":"CVE-2026-102991","record":{"aliases":["AZL-105645","CLEANSTART-2026-RY75386","CLEANSTART-2026-XA70442","ECHO-ad96-000e-33ae","GHSA-5639-2j2p-m4mx","MINI-56m4-2j5m-wh29","MINI-8884-w928-384w","MINI-9hjp-86h3-mp97","MINI-m8rj-v8mg-jfpf","MINI-q9qr-h686-x5r9","MINI-qjjj-79mx-65rp","MINI-vmh7-926c-3jcx","PYSEC-2026-4243","UBUNTU-CVE-2026-102991"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python template library","requires_auth":"none","summary":"Attackers can exploit path traversal in Mako on Windows to read arbitrary files or execute code via crafted template URIs.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Mako: Path traversal via drive-letter URI on Windows in TemplateLookup","id":"CVE-2026-102991","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"piscina: Prototype-pollution gadget in ThreadPool.options allows RCE via execArgv / loadBalancer / env","id":"CVE-2026-102992"},"packages":[{"ecosystem":"PyPI","fixed":["1.4.2"],"introduced":["0"],"last_affected":[],"package":"Mako","purl":null,"source":"GHSA-5639-2j2p-m4mx"},{"ecosystem":"PyPI","fixed":["1.4.2"],"introduced":["0"],"last_affected":[],"package":"mako","purl":"pkg:pypi/mako","source":"GHSA-5639-2j2p-m4mx"},{"ecosystem":"PyPI","fixed":["1.4.2"],"introduced":["0"],"last_affected":[],"package":"mako","purl":"pkg:pypi/mako","source":"PYSEC-2026-4243"}],"prev":{"headline":"basic-ftp: Quadratic-time CPU denial of service in Client.list() Unix directory-listing parser (RE_LINE backtracking)","id":"CVE-2026-102990"},"products":["mako"],"published":"2026-09-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-09-30","vendors":["sqlalchemy"]},"summary":"Attackers can exploit path traversal in Mako on Windows to read arbitrary files or execute code via crafted template URIs.","url":"https://insights.sbomify.com/CVE-2026-102991/"}