---
id: "CVE-2026-102359"
page: "https://infrastack.ai/live/CVE-2026-102359"
kind: "vulnerability"
aliases: ["CVE-2026-102359"]
title: "Kroki: crafted LaTeX lets unauthenticated users read container files"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["docker", "kroki", "package", "self-hosted", "tikz"]
not_affected_if: ["auth-required", "internal-only"]
published_at: "2026-11-06T18:17:37+00:00"
first_seen_at: "2026-11-06T18:44:08+00:00"
updated_at: "2026-11-06T18:45:17+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102359", "first_seen_at": "2026-11-06T18:44:08+00:00"}]
exploit_sources: []
---

# Kroki: crafted LaTeX lets unauthenticated users read container files

Link for people: https://infrastack.ai/live/CVE-2026-102359 (this .md is for agents)

Kroki turns text into diagrams, and its TikZ renderer blocks only one LaTeX file-read command when safe mode is on. An unauthenticated attacker can submit crafted LaTeX to read any file the Kroki container can access, such as mounted secrets or private keys, and receive the contents inside the returned SVG.

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

## How to check

- Check the running Kroki version and whether it is below `0.31.2`.
- Check whether the TikZ backend is exposed, for example `POST /tikz/svg` reachable from outside your network.
- Check whether `KROKI_SAFE_MODE` is enabled; the sources say the flaw sits in the safe-mode guard.

## Fix

- Kroki: upgrade to `0.31.2`.

## Timeline

- 2026-11-06T18:44:08+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-102359

## Documents

- [advisory] Vendor advisory: github.com https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw
- [fix] Patch: github.com https://github.com/yuzutech/kroki/commit/9108ab5b429b9dc82b76432ccf40d4d7eeba1b30
- [fix] Release notes: github.com https://github.com/yuzutech/kroki/releases/tag/v0.31.2

## From the sources

Kroki creates diagrams from textual descriptions. Prior to 0.31.2, the TikZ backend's tikz/tikz2svg guard used when KROKI_SAFE_MODE is enabled blocks only \verbatiminput while allowing native TeX file-read primitives including \openin, \read, \input, and \include. TeX Live's permissive openin_any setting remains active, so an unauthenticated actor can submit crafted LaTeX to POST /tikz/svg or the generic diagram API and cause the renderer to read any file accessible to the Kroki container user. The file contents are rendered into the returned SVG, which may disclose mounted secrets, configuration data, credentials, private keys, or process environment data. The -no-shell-escape option prevents shell execution but does not restrict these native file operations. This issue is fixed in version 0.31.2.

---

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