← All episodes
Special · Local AI ·11:11 ·October 27, 2026

What It Really Takes to Run AI Locally — and the Security You Have to Manage

Earlier this year, one crafted model file made Ollama hand back pieces of its own memory, API keys included, before anyone typed a prompt. This episode maps everything around a local model and marks where attacks have actually landed.

The Promise

  • Running locally keeps your data on hardware you control, and for a lot of workloads that's the right call.
  • The weights themselves are numbers. Safetensors holds numbers and nothing else, and GGUF holds numbers plus a header that describes them, so neither runs code on its own.
  • The defenses are cheap: a minimum runner version, trust remote code left off, and a model server that only your own machine can reach.
PROMISE RISK
Balanced

The Risk

  • A model file is input to a program. A crafted GGUF header declared blocks larger than the file, and Ollama read past the end of the data into its own memory: environment variables, API keys, system prompts and other users' conversations. The fix shipped in Ollama 0.17.1.
  • Parser flaws can ship without a CVE. An independent audit of llama.cpp published several in May as CVE candidates, so a scanner checking the CVE list would have walked past them.
  • Ollama's API has no authentication. It listens only on your own machine by default, but the documented setting for reaching it from elsewhere opens it to the whole network, and the same unauthenticated door was hit twice in two years.

A model file is input to a program

Earlier this year, researchers at a security firm built a model file for Ollama. They never asked it a question. They handed Ollama the file, and Ollama handed back pieces of its own memory, API keys and other users’ conversations included. The file’s header described blocks of numbers larger than the file itself, Ollama believed it, and it kept reading whatever sat next to the data in memory. Ollama is written in Go, a language designed to prevent that kind of bug. The flaw sat in the one package Go names unsafe.

I’ve spent 25 years in cybersecurity, and this pattern is familiar. For years attackers went after the software that reads images and PDFs, because everyone opens those without a second thought. A model file is the newest thing on that list. The numbers are harmless; the program reading them is software, and a stranger wrote the file.

What rides along with the weights

Download a model and you get a bundle. Some repositories ship Python files that run only if you switch on trust remote code, and then they run with your permissions. The chat template is written in Jinja and ships inside the model file: in 2024 llama-cpp-python executed those templates without a sandbox, and Checkmarx counted more than 6,000 models on Hugging Face using the affected combination. Most people download a quantized copy someone else made, which nothing proves matches the lab’s release. And a LoRA adapter changes behavior: a 2023 paper showed fine-tuning can erode safety training, its title noting it happens “even when users do not intend to.” The model you evaluated is not the model you run.

The runner and the server

The runner makes decisions for you. On a small graphics card, Ollama’s default context is about 4,000 tokens, so a long contract gets answered from whatever fit. Its Windows updater carried two flaws that could be chained into persistent code execution, still unpatched when the details went public in May. Above the runner sits an API with no password. Wiz found an Ollama flaw in 2024 that came in through an unauthenticated endpoint too. Two years apart, the same door.

Six markers landed on this map, and not one of them sits on the box everyone benchmarks.

Three checks

  1. The files. Know where they came from, keep trust remote code off, and know who trained any adapter and on what.
  2. The runner. Run ollama --version. If it’s older than 0.17.1, update it today, then hold a minimum version rather than a list of CVEs.
  3. The server. Check what address it listens on. If anything besides your own machine can reach it, put authentication or a private network in front of it.

Treat your runner like a browser: a program that opens files from strangers all day and needs patching like one. For a local model doing real work with the build log open, see the Mini SOC.