---
id: "CVE-2026-123198"
kind: "vulnerability"
aliases: ["CVE-2026-123198"]
title: "LMFDB: template injection in render_knowl lets web requests run OS commands"
severity: "critical"
cvss: 9.8
epss: null
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["jinja2", "lmfdb", "other", "python", "self-hosted", "web"]
not_affected_if: ["commit-01829bd-or-later"]
published_at: "2026-11-05T19:17:18+00:00"
first_seen_at: "2026-11-05T19:40:35+00:00"
updated_at: "2026-11-05T19:42:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-123198", "first_seen_at": "2026-11-05T19:40:35+00:00"}]
exploit_sources: []
---

# LMFDB: template injection in render_knowl lets web requests run OS commands

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether the deployed LMFDB code is older than commit `01829bd`, for example with `git log` on the deployed checkout
- 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)

## Timeline

- 2026-11-05T19:40:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-123198

## Documents

- [advisory] Vendor advisory: github.com https://github.com/LMFDB/lmfdb/security/advisories/GHSA-6jw3-pmcx-2xww
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/lmfdb-before-commit-01829bd-unauthenticated-server-side-template-injection-via-knowledge-render-id
- [fix] Patch: github.com https://github.com/LMFDB/lmfdb/commit/01829bd09b692c720aad30c952758a20630573d4

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
