{"id":"CVE-2026-123198","kind":"vulnerability","aliases":["CVE-2026-123198"],"related":[],"title":"LMFDB: template injection in render_knowl lets web requests run OS commands","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.","summary":"LMFDB, the L-functions and modular forms database web application, has a server-side template injection in its render_knowl function. An unauthenticated attacker can send crafted query-string values or content data to /knowledge/render/<ID> and reach Python builtins to execute operating system commands as the web application account.","severity":"critical","cvss":9.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["jinja2","lmfdb","other","python","self-hosted","web"],"not_affected_if":["commit-01829bd-or-later"],"how_to_check":"- Check whether the deployed LMFDB code is older than commit `01829bd`, for example with `git log` on the deployed checkout\n- Look for a request to `/knowledge/render/` in web server logs with Jinja-style syntax such as `{{` or `}}` in query parameters or content fields","fix":"- LMFDB: move to a commit at or after `01829bd` (the sources name the patch commit only)","status":"open","published_at":"2026-11-05T19:17:18+00:00","first_seen_at":"2026-11-05T19:40:35+00:00","triaged_at":"2026-11-05T19:42:30+00:00","updated_at":"2026-11-05T19:42:30+00:00","category":"other","confidence":0.7,"triage":{"at":"2026-11-05T19:42:30Z","model":"claude-haiku-5-5","output":{"fix":"- LMFDB: move to a commit at or after `01829bd` (the sources name the patch commit only)","reach":"internet","title":"LMFDB: template injection in render_knowl lets web requests run OS commands","impact":"high","summary":"LMFDB, the L-functions and modular forms database web application, has a server-side template injection in its render_knowl function. An unauthenticated attacker can send crafted query-string values or content data to /knowledge/render/<ID> and reach Python builtins to execute operating system commands as the web application account.","audience":"businesses","category":"other","nicknames":[],"who_cares":["lmfdb","self-hosted","python","jinja2","web"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Attacker runs operating system commands as the web application account.","analyst_note":"Confirm the affected version range and whether the fixed commit is the only fix; check the NVD and vendor advisory links for any configuration detail.","how_to_check":"- Check whether the deployed LMFDB code is older than commit `01829bd`, for example with `git log` on the deployed checkout\n- Look for a request to `/knowledge/render/` in web server logs with Jinja-style syntax such as `{{` or `}}` in query parameters or content fields\n- unknown for any other configuration check; the sources do not say","plain_action":"","needs_analyst":true,"not_affected_if":["commit-01829bd-or-later"],"who_is_affected":"Any deployment of LMFDB built from a commit before `01829bd` that serves the knowledge rendering route is exposed, since the flaw is reachable without an account. Operators who run LMFDB only on a closed network or who do not serve the /knowledge/render/ endpoint are less exposed. The sources do not say whether managed or hosted instances are affected.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000758,"input_tokens":4294,"output_tokens":658,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-123198':15A,18A '-2026':14A,17A '/knowledge/render':64B,119C '01829bd':82C 'account':78B,133C 'allow':97C 'applic':37B,77B,132C 'attack':52B,99C,107C 'builtin':68B,123C 'command':12A,73B,128C 'commit':81C 'contain':83C 'content':61B,116C 'craft':55B,110C 'cve':13A,16A 'data':62B,117C 'databas':35B 'execut':70B,125C 'express':103C 'form':34B 'function':31B,49B,95C 'host':25B 'inject':3A,44B,89C,101C 'jinja':102C 'jinja2':19B 'knowl':6A,48B,94C 'l':30B 'l-function':29B 'let':7A 'lmfdb':1A,20B,27B,79C 'modular':33B 'oper':71B,126C 'os':11A 'paramet':106C 'python':22B,67B,122C 'queri':57B,112C 'query-str':56B,111C 'reach':66B,121C 'render':5A,47B,93C 'request':9A,105C 'run':10A 'self':24B 'self-host':23B 'send':54B 'server':41B,86C 'server-sid':40B,85C 'side':42B,87C 'string':58B,113C 'suppli':109C 'system':72B,127C 'templat':2A,43B,88C 'unauthent':51B,98C 'valu':59B,114C 'via':104C 'vulner':90C 'web':8A,26B,36B,76B,131C","nicknames":[],"mitigations":[],"who_affected":"Any deployment of LMFDB built from a commit before `01829bd` that serves the knowledge rendering route is exposed, since the flaw is reachable without an account. Operators who run LMFDB only on a closed network or who do not serve the /knowledge/render/ endpoint are less exposed. The sources do not say whether managed or hosted instances are affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["critical","jinja2","lmfdb","other","python","selfhosted","web"],"campaign_type":null,"first_public_at":"2026-11-02T17:54:55+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-123198","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123198","severity":null,"published_at":"2026-11-05T19:17:18+00:00","modified_at":"2026-11-05T19:17:18+00:00","first_seen_at":"2026-11-05T19:40:35+00:00","fetched_at":"2026-11-05T19:40:35+00:00","note":null}],"documents":[{"id":79187,"url":"https://github.com/LMFDB/lmfdb/commit/01829bd09b692c720aad30c952758a20630573d4","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":79188,"url":"https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-02T17:54:55+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":79189,"url":"https://www.vulncheck.com/advisories/lmfdb-before-commit-01829bd-unauthenticated-server-side-template-injection-via-knowledge-render-id","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}