Added
- Serve an OpenAPI description of the HTTP API at
/openapi.json, generated from the diagram types and options available on the server (#2270) - Add the
typeof the error (diagram-error,unsupported-format,timeout...) and, when the diagram library reports it, theline(andcolumn) of the error in the diagram source to JSON error responses. PlantUML, Structurizr and Mermaid errors include a line (#2296)
Changed
- The Mermaid, BPMN, Excalidraw and diagrams.net companion images are now based on
alpineinstead ofnode:alpine, and only include thenodebinary:npm,npx, Yarn and corepack are no longer available. If you build an image on top of one of them and install packages, install them in anode:alpinestage and copy the result, or add thenpmAlpine package (#2283)
Fixed
- The line reported in PlantUML error messages is now the line of the diagram source: it was off by one when the diagram started with
@startuml, or when thethemeoption was used, and did not account for leading blank lines and inlined C4 includes (#2296) - The lines reported in Mermaid error messages are now lines of the diagram source: Mermaid ignores comment lines and leading blank lines when counting lines (#2296)
- Return a
503 Service Unavailableerror, instead of400 Bad Request, when a companion service is overloaded (#2296) - Fix a crash of UMLet on some linux/arm64 hosts, where any diagram containing text returned a
400 Bad Requesterror, by building the UMLet and ditaa binaries with GraalVM 25.0.5 (#2299) - Fix ditaa and UMLet diagrams failing on x86-64 CPUs without AVX2 (x86-64-v2 and older): their native binaries are now built for any x86-64 CPU (#2303)
Security
- Prevent
bytefielddiagrams from executing arbitrary commands on the server (unauthenticated remote code execution). bytefield-svg evaluates the diagram source withsci, whose sandbox exposesaget/aset; a diagram could rebind the nativeCallSite.getThisas a property getter, walkError.prepareStackTraceto a frame receiver that is the global object, reachprocessandchild_process, and run a command. This bypassed the existing--disallow-code-generation-from-stringsmitigation, which only blockseval/new Function. Thebytefieldbinary now freezesError.prepareStackTraceso diagram code can no longer obtainCallSiteobjects (closing the escape, including the exfiltration ofprocess.env), and the server runs it under the Node.js Permission Model (--permission), so even an unknown future escape cannot spawn a child process, access the filesystem, or start a worker (GHSA-hwvq-g72h-v55j) - Update the Java runtime of the server image to Eclipse Temurin 21.0.13.1, which fixes CVE-2026-114938 ("Java4Shell"), a memory corruption in the HotSpot AVX-512 Base64 decoder that can lead to remote code execution (#2306)
- Render TikZ SVGs with
dvisvgmfrom a directory that contains only the sanitized DVI file. In secure mode an untrusted TikZ diagram could write a virtual font (.vf) into its working directory, shadowing an installed one;dvisvgmwould then resolve it and execute the PostScript specials embedded in its character packets through Ghostscript, bypassing the DVI sanitizer (which only rewrites the top-level DVI) and allowing arbitrary command execution (GHSA-h3hf-44rq-5jfq) - Remove the npm CLI from the Mermaid, BPMN, Excalidraw and diagrams.net companion images. npm never runs in these containers, but vulnerability scanners reported the packages it bundles, for instance
undici,glob,minimatch,brace-expansionandip-address(#2283) - Install
@excalidraw/excalidraw,reactandreact-domas development dependencies in the Excalidraw companion: they are only used to build the browser bundle, and are no longer copied into the runtime image, where vulnerability scanners reported some of their dependencies, for instancelodash-esandnanoid(#2285) - Prevent D2 diagrams from reading any file readable by the server (for instance
/etc/passwdor/proc/self/environ, which holds the server environment variables) and from making the server fetch an arbitrary URL (SSRF, e.g. against internal services): aniconor an image naming a local file or a URL was read or fetched byd2, and embedded in the SVG, regardless ofKROKI_SAFE_MODE. Unless Kroki is running inUNSAFEmode,d2now runs with--bundle=falseand with a new--allow-local-files=falseflag, added by a patch applied when building D2 from source: images are kept as links in the SVG, and importing a file is an error (GHSA-w5wj-qr95-xm33)
Diagram libraries
What's Changed
- build: remove npm from the companion images at runtime by @lipkau in #2283
- build(excalidraw): install the Excalidraw library as a development dependency by @ggrossetie in #2285
- feat: serve an OpenAPI description of the API by @Assaviv in #2270
- docs: address review feedback on the Extending Kroki guide by @ggrossetie in #2292
- chore(deps): update java dependencies by @ggrossetie in #2291
- chore(deps): update dependency jdx/mise to v2026.11.6 by @ggrossetie in #2288
- chore(deps): update dependency graphviz/graphviz to v16.1.1 by @ggrossetie in #2287
- chore(deps): update dependency @biomejs/biome to v2.6.6 by @ggrossetie in #2286
- chore(deps): update golang docker tag to v1.27.4 by @ggrossetie in #2289
- chore(deps): update dependency bytefield-svg to v1.12.0 by @ggrossetie in #2290
- chore(deps): update Graphviz to 16.1.1 by @ggrossetie in #2293
- ci: update and publish the tool images from a single Renovate pull request by @ggrossetie in #2294
- feat: expose a structured error type and location in JSON error responses by @ggrossetie in #2296
- docs: add Podway to third-party providers by @velsa in #2298
- feat(docs): add Simafri to hosting providers by @simon-vasconcelos-lee in #2301
- fix(security): update Eclipse Temurin to 21.0.13.1 (CVE-2026-114938) by @ggrossetie in #2306
- docs: explain how to propose a new diagram library by @ggrossetie in #2305
- build(deps): update GraalVM native-image to 25.0.5 for UMLet and ditaa by @wzaldivar in #2299
- fix: build the ditaa and UMLet native binaries for any x86-64 CPU by @wzaldivar in #2303
New Contributors
- @lipkau made their first contribution in #2283
- @velsa made their first contribution in #2298
- @simon-vasconcelos-lee made their first contribution in #2301
- @wzaldivar made their first contribution in #2299
Full Changelog: v0.36.0...v0.37.0