On this page (7 sections)

CVE-2026-123198 is a critical server-side template injection (SSTI) flaw in LMFDB. According to the NVD record, versions before commit 01829bd contain a flaw in the render_knowl function that lets unauthenticated attackers inject Jinja expressions and execute operating system commands as the web application account.

If you host your own LMFDB instance, or run a fork that includes its code, this is worth acting on today. Coverage so far is thin: the only source in our research is the NVD entry, so some details below are marked as unconfirmed.

What happened

The NVD entry, published on 2026-11-05, describes a flaw in the render_knowl function. Requests to the /knowledge/render/<ID> path reach it. Attackers do not need to log in. By supplying crafted query-string values or 'content' data, they can get their input evaluated as a Jinja expression and reach Python builtins, which leads to command execution as the account the web application runs under.

The fix is referenced as commit 01829bd, with a related pull request and a GitHub security advisory. A VulnCheck advisory also exists. We could only confirm the NVD text, so check those pages for fix details we have not verified.

Why template injection is so serious

Template engines such as Jinja are meant to merge trusted templates with data. Server-side template injection happens when untrusted input is treated as part of the template itself rather than as data. The engine then evaluates the attacker's expression on the server, and in Python-based engines that can provide a path to builtins and from there to the operating system.

The impact is comparable to remote code execution. Commands run with the privileges of the web application account, so an attacker could potentially read configuration files, database credentials and any data that account can reach. The NVD text does not describe specific post-exploitation outcomes, so treat those as general risk rather than documented behavior of this flaw.

Who is exposed

  • Administrators of self-hosted LMFDB deployments that run code from before commit 01829bd.
  • Developers who forked or copied LMFDB's knowledge module code.
  • Any instance reachable from the internet, since no authentication is required.

The research does not give a list of affected release numbers, because the fix is identified by commit. If you deploy from a git checkout, your exposure depends on whether your checkout contains that commit.

How to check your exposure

Run this from your LMFDB checkout on the server. It tests whether commit 01829bd is an ancestor of your current HEAD and prints which case applies. The message "fix commit present" means your code includes the fix.

Check whether your checkout includes the fix commit (run in the LMFDB repository directory)Shell
git merge-base --is-ancestor 01829bd09b692c720aad30c952758a20630573d4 HEAD && echo "fix commit present" || echo "fix commit NOT present"

If the repository history is shallow, fetch more history first, otherwise the check may give a misleading answer. Then review web server logs for unusual requests to the affected path. This read-only search lists requests to /knowledge/render/ in an nginx access log; adjust the path for your setup.

List requests to the affected path in an nginx access log (path may differ on your system)Shell
grep "/knowledge/render/" /var/log/nginx/access.log | less

Look for very long query strings, unusual characters such as curly braces or underscores in parameters, and requests from addresses you do not recognize. Absence of such entries does not prove safety, since request bodies are usually not logged.

What to do now

  1. Update your LMFDB code to a version that includes commit 01829bd or later.
  2. Restart the application after updating so the new code is loaded.
  3. If you cannot update immediately, restrict access to /knowledge/render/ at your reverse proxy or firewall, or take the instance offline.
  4. Review access and application logs for suspicious requests to /knowledge/render/ since you first deployed the vulnerable code.
  5. Check the web application account for unexpected files, cron entries, new users or outbound connections.
  6. If you suspect compromise, rotate secrets the application could read, such as database passwords and API keys.
  7. Run the application under a dedicated, low-privilege account with no unnecessary file or network access.
Caution. Restarting the application will interrupt service. Schedule it for a quiet period, and take a backup of configuration and data before you change anything on a production server.
Tip. Blocking a single path is a stopgap, not a fix. Attackers may find other routes to the same function, so treat the code update as the real remediation.

Detection and monitoring

After patching, keep watching for signs that someone got in before you did. Alert on new processes spawned by the web server account, unexpected outbound traffic from the host, and changes to files in the application directory. Keep access logs long enough to look back at the period before the update.

From the outside, you can review what your public site exposes with a security headers check and a free malware scan, though outside-in tools cannot see server-side command execution directly; see what outside-in detection can and cannot see. If you suspect a breach, follow the steps in website hacked: what to do.

Timeline

Known dates for CVE-2026-123198
DateEvent
2026-11-05CVE-2026-123198 published in NVD with a CVSS score of 9.3
This story currently rests on a single source, the NVD record. We have not independently verified details in the linked GitHub and VulnCheck pages, so read the vendor advisory before planning your response.

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. CVE-2026-123198: LMFDB before commit 01829bd contains a server-side template injection vulnerability in the render_knowl function that allows unauthenticated attackers to…nvd.nist.gov ·
  • LMFDB
  • SSTI
  • Jinja
  • Critical vulnerability
  • CVE-2026-123198