Skip to main content
← Vulnerabilities

Kroki: TikZ Secure Mode Local File Read via LaTeX File I/O Primitives

Affects Kroki 0.31.1 and earlier with TikZ enabled in secure mode, where the secure mode guard is the only file-access restriction. Fixed in 0.31.2.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

7.5HighCNA
Exploited
No known exploitation
Fix
Fixed in 0.31.2
Who is exposed
Default setups

Do first: Check every install: default setups are affected.

Published
Last modified
30/100 · provisional
Default setups
None on Exploit-DB, Metasploit or GitHub

Summary

Kroki, a service that turns text descriptions into diagrams, has a flaw in its TikZ safe mode that lets an unauthenticated attacker read arbitrary files the Kroki container can access, remotely over the network, by submitting crafted LaTeX to the rendering endpoints. The file contents are returned inside the rendered SVG, which can expose secrets, configuration, credentials, or private keys.

Read the original description

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.

cve.now Index

30Pcve.now Index 30 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure22/25Default setups, reachable over the network without a login
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity7.5/10CVSS 7.5
  • No patch0/5No signal

What would change the score

  • Would score about 70 if added to CISA KEV
  • Would score about 65 if CISA's SSVC rates exploitation active

What to do

  • Check every install: default setups are affected.

  • Upgrade to a fixed version: 0.31.2.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • yuzutech kroki

    fixed in 0.31.2

Evidence 3

  1. Advisory
  2. Repository
  3. Repository

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-102359

Is CVE-2026-102359 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

TikZ secure mode is meant to stop the LaTeX engine from accessing files. The flaw lets a request read any file on the Kroki container that the Kroki process user can read, and the contents are returned in the SVG output.Source: github.com

Which versions are affected by CVE-2026-102359?

kroki: before 0.31.2.Source: cve.now feed data

Am I affected, and how do I check?

Kroki 0.31.1 or earlier with TikZ enabled is affected, and the advisory says earlier versions are likely affected too. To check, look at the Kroki version and whether TikZ is enabled in the instance configuration. The advisory also notes that TeX Live ships with openin_any set to allow any path by default, which is the permissive setting the guard depends on.Source: github.com

How do I fix CVE-2026-102359?

Upgrade Kroki to 0.31.2 or later, which is the fixed version listed for this product.Source: github.com