Skip to main content

Kroki CVE-2026-102359

| EUVDEUVD-2026-118386 HIGH
Path Traversal (CWE-22)
2026-11-06 GitHub_M
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach public /tikz/svg endpoint
  2. Delivery
    Submit crafted LaTeX with \openin/\read
  3. Exploit
    TeX opens arbitrary container-readable file
  4. Execution
    File contents rendered into returned SVG
  5. Impact
    Exfiltrate secrets, credentials, or private keys

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a reachable Kroki instance prior to 0.31.2 with the TikZ backend enabled and KROKI_SAFE_MODE at secure (value 10) - all of which are the shipped defaults of the official Docker image, so no special configuration is needed. The attacker submits LaTeX using native TeX file-read primitives (\openin/\read, \input, \include); these bypass the secure-mode guard, which only blocked \verbatiminput, because TeX Live's openin_any defaults to 'a' (allow any path) and the Dockerfile never restricts it. Limiting factors: disclosure is bounded to files readable by the container user (e.g., /etc/passwd, /run/secrets/*, app config, /proc/self/environ); -no-shell-escape blocks \write18 shell execution so this is read-only, not code execution; and instances already upgraded to 0.31.2 (which forces openin_any=p/openout_any=p) are not exploitable.

Impact

This is a genuine, high-priority information-disclosure flaw rather than an inflated high-CVSS-but-low-risk issue. The CVSS vector (AV:N/AC:L/PR:N/UI:N, C:H) describes unauthenticated, low-complexity network exploitation against the default Kroki configuration, and the supplied evidence corroborates the mechanism: the GHSA advisory includes a complete LaTeX payload and a dynamic verification result showing /etc/passwd contents returned in an 8,488-byte SVG from the stock yuzutech/kroki:0.31.1 image. So the network/unauthenticated characterization is confirmed by working proof, not merely inferred from the vector. The vuln.today decision label is this_week (not act_now/emergency), consistent with a serious issue that is not yet mass-exploited. No EPSS score was provided, and the CVE is not listed in CISA KEV, so there is no confirmed active exploitation in the wild - the elevated urgency comes from the confirmed, trivially reproducible PoC plus unauthenticated reach, not from observed attacks. Net: treat as a real priority to patch quickly, especially for internet- or internal-network-reachable instances; the main thing capping it below critical is the impact being confidentiality-only (C:H, I:N, A:N), bounded by what the container user can read.

Exploit ScenarioDerived

An attacker with network access to a Kroki instance (version < 0.31.2) POSTs a crafted LaTeX document to /tikz/svg (or the generic diagram API) using TeX's native \openin/\read primitives to open a sensitive file; the renderer embeds the file's contents as text in the returned SVG, disclosing secrets, credentials, private keys, or environment data. No authentication, user interaction, or non-default configuration is required. A complete, dynamically verified PoC is published in the GHSA advisory (confirmed reading /etc/passwd against the official 0.31.1 image), so exploitation is trivial to reproduce.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 06, 2026

Unauthenticated local file read in Kroki's TikZ backend (all versions prior to 0.31.2) lets a remote attacker submit crafted LaTeX to POST /tikz/svg or the generic diagram API and receive the contents of any file readable by the container user rendered back inside the returned SVG. The secure-mode guard only blocked \verbatiminput, leaving native TeX file primitives (\openin/\read, \input, \include) unrestricted while TeX Live's default openin_any=a keeps absolute path reads permitted, so the shipped Docker defaults are exploitable with no special configuration. A public proof-of-concept has been demonstrated against the official yuzutech/kroki:0.31.1 image, extracting /etc/passwd signatures from the SVG response; -no-shell-escape prevents \write18 shell execution, so the impact is read-only disclosure (mounted secrets, config files, private keys, /proc/self/environ) rather than code execution, and instances upgraded to 0.31.2 are not exploitable.

RemediationAI

Vendor-released patch: upgrade Kroki to 0.31.2, which replaces the \verbatiminput blocklist in tikz/tikz2svg with kpathsea paranoid mode by exporting openin_any=p and openout_any=p in secure mode, rejecting absolute paths and directory traversal for both reads and writes. Update the container image tag (for example from yuzutech/kroki:0.31.1 to yuzutech/kroki:0.31.2) and confirm the release notes at https://github.com/yuzutech/kroki/releases/tag/v0.31.2 and advisory https://github.com/yuzutech/kroki/security/advisories/GHSA-r54f-fq6c-53vw. If an immediate upgrade is not possible, apply the patch commit 9108ab5b429b9dc82b76432ccf40d4d7eeba1b30 to the deployed tikz2svg script, or set openin_any=p and openout_any=p in texmf.cnf or the container environment yourself; the trade-off is that diagrams legitimately referencing files outside the render working directory will stop resolving, which upstream states is not a supported use case. Alternatively disable the TikZ backend entirely or remove /usr/bin/tikz2svg from the image, accepting that TikZ diagrams will no longer render, and restrict network access to /tikz/svg and the generic diagram API to trusted clients. Run the container with the least privilege available and avoid mounting secrets, service-account tokens, or private keys into the Kroki container, since any file readable by the process user can be exfiltrated; note that KROKI_SAFE_MODE=secure does not mitigate this issue because it is the vulnerable default configuration.

Affected VersionsENISA

kroki < 0.31.2

Affected Packages

euvd kroki fix: 0.31.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Kroki's TikZ service shells out to the tikz/tikz2svg script, which stores attacker-supplied source in raw_input.tex and invokes latex with LATEX_OPTIONS set to -no-shell-escape -halt-on-error. When KROKI_SAFE_MODE resolves to secure (the shipped default, SafeMode.SECURE = 10), the script's only check greps raw_input.tex for the literal string \verbatiminput and rejects it; every other file-access primitive in the TeX language reaches the engine untouched. TeX Live's kpathsea lookup policy, controlled by openin_any/openout_any in texmf.cnf, defaults to 'a' (allow any path) in a stock installation and the Kroki image never overrides it, so \openin paired with \read (or \input, \include, \lstinputlisting and similar macros) can open arbitrary absolute paths and typeset their bytes into the intermediate DVI/PDF that is finally converted to SVG. This is CWE-22 path traversal realized through an incomplete command blocklist rather than proper confinement: the fix in commit 9108ab5b replaces the blocklist with kpathsea paranoid mode by exporting openin_any=p and openout_any=p, which rejects absolute paths and '..' traversal for both reads and writes and confines TeX file access to the temporary working directory. The -no-shell-escape flag only disables \write18 shell escapes and has no bearing on these native file operations, so the vulnerable path yields arbitrary file disclosure without command execution. Affected deployments are those with the TikZ backend reachable over HTTP, including the generic POST / JSON API, which routes to the same DiagramHandler and TikZ.convert path described in the advisory.

Know when Kroki gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

Unauthenticated network POST to a default-enabled endpoint (AV:N/AC:L/PR:N/UI:N) reads arbitrary container-readable files for high confidentiality impact, with no integrity or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Nov 06, 2026 - 18:02 EUVD
CVE Published
Nov 06, 2026 - 17:36 cve.org
HIGH 7.5

DescriptionCVE.org

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.

Technical POC Analysis

CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) in the TikZ rendering path of Kroki's Java server plus its shell wrapper.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 public PoC link from nuclei

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

CVE-2026-102359 is a high-severity vulnerability in Kroki's TikZ backend, affecting all versions before 0.31.2. Unauthenticated remote attackers can read any file accessible to the container user, potentially exposing secrets, configuration files, and private keys. This poses a significant risk to organizations using Kroki to render diagrams, as sensitive data could be compromised without authentication.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Model

4 threats: Information Disclosure, Spoofing, Elevation of Privilege and 1 more

4-step attack chain with trust boundaries and controls

Full threat model - attack chain, trust boundaries, controls per stage and evidence - is part of the Pro and Business plans.

Threat Intelligence Overview

EPSS Score
0.4%
Top 63% exploitable
Prevalence
Low
niche self-hosted open-source diagram-rendering service, limited production footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy