C++Severity: LowStatus: Published
Two HTTP API paths can end the process: img2img mask invert writes through a failed mask load, and audio decode resizes from an uncapped decoder-reported length
Two HTTP API paths can stop the koboldcpp process. POST /sdapi/v1/img2img with a mask and inpainting_mask_invert does not check that the mask loaded, so a mask that fails to decode can make the invert loop write through a null pointer and crash the process. An image model has to be loaded. POST /api/extra/transcribe lets the audio decoder size its buffer from the frame count in the container header, with no cap. On the built-in whisper path that allocation failure is not caught, which ends the process. A whisper model has to be loaded. Both paths are reachable with no authentication when --password is unset, which is the default. Versions before 1.126 are affected. Fixed in 1.126. Reviewed at v1.125.1. GitHub rates it low. The advisory credits ucsurf as reporter. Found by reading the source.
Impact
Two HTTP API paths can stop the koboldcpp process.
POST /sdapi/v1/img2img with a mask and inpainting_mask_invert does not check that the mask loaded. A mask that fails to decode can make the invert loop write through a null pointer and crash the process. An image model has to be loaded.
POST /api/extra/transcribe lets the audio decoder size its buffer from the frame count claimed in the container header, with no cap. On the built-in whisper path that allocation failure is not caught, which ends the process. A whisper model has to be loaded.
Both paths are reachable with no authentication when --password is unset, which is the default.
Affected versions and fix
koboldcpp versions before 1.126 are affected. The patched release is 1.126. This was reviewed at v1.125.1.
The published advisory is GHSA-c483-gxj5-6g2m. GitHub rates it low. The advisory was published on 2026-12-04. The advisory credits ucsurf as reporter.
Found by reading the source.
Timeline
- Found
- Advisory published
- Entry last updated
Machine-readable: JSON · Markdown · ID security/cpp/LostRuins__koboldcpp/2026-12-04-http-api-paths-can-end-the-process
If this work is useful to you, you can support it on Buy Me a Coffee.