{"id":"CVE-2026-123198","published":"2026-11-05T19:17:18.393","lastModified":"2026-11-05T21:18:45.820","description":"LMFDB before commit 01829bd contains a server-side template injection vulnerability in the render_knowl function that allows unauthenticated attackers to inject Jinja expressions via request parameters. Attackers can supply crafted query-string values or 'content' data to /knowledge/render/<ID> to reach Python builtins and execute operating system commands as the web application account.","cvssScore":9.8,"cvssSeverity":"CRITICAL","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwes":["CWE-1336"],"vendors":[],"products":[],"references":[{"url":"https://github.com/LMFDB/lmfdb/blob/c6e5bac205aa12de9edf584a06328fefa81de0de/lmfdb/knowledge/main.py#L747","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/commit/01829bd09b692c720aad30c952758a20630573d4","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/pull/7231","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww","tags":[]},{"url":"https://www.vulncheck.com/advisories/lmfdb-before-commit-01829bd-unauthenticated-server-side-template-injection-via-knowledge-render-id","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww","tags":[]}],"exploitRefs":[{"url":"https://github.com/LMFDB/lmfdb/blob/c6e5bac205aa12de9edf584a06328fefa81de0de/lmfdb/knowledge/main.py#L747","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/commit/01829bd09b692c720aad30c952758a20630573d4","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/pull/7231","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww","tags":[]},{"url":"https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww","tags":[]}],"hasPoc":true,"ai":{"summary":"A server-side template injection (SSTI) flaw in LMFDB's render_knowl function allows unauthenticated attackers to inject and execute arbitrary Jinja2 expressions via request parameters, leading to full remote code execution as the web application user.","exploitability":"Exploitation is trivial for unauthenticated attackers due to lack of input sanitization and direct access to Python builtins through crafted query-string or POST data.","blast_radius":"Successful exploitation grants full system compromise with the privileges of the web server process, enabling data theft, service disruption, or lateral movement within the infrastructure.","remediation":"Upgrade to LMFDB commit 01829bd or later, which patches the SSTI vulnerability by sanitizing user-supplied input before template rendering.","detection":"Look for HTTP requests to /knowledge/render/<ID> containing suspicious Jinja2 syntax (e.g., {{ config.__class__ }}, {{ ''.__class__.__mro__[1].__subclasses__() }}) or attempts to invoke Python builtins like __import__, eval, or os.system in query parameters or POST body; such patterns may appear in access logs or WAF alerts.","tags":["ssti","rce","web","unauthenticated","template-injection"],"model":"garnet-coder","analyzedAt":"2026-11-06T09:45:11.672Z"}}