You can scan any local Ollama, LM Studio, or vLLM model for dangerous shell and tool-call exploits in roughly 60 seconds using the free Apache-2.0 ViKernel Scanner CLI from GitHub or its browser-based Hugging Face Space, which tests your model against 100 real-world attack prompts and assigns an instant A to F security grade.
Why All 20 Open-Weight Models Failed the ViKernel Shell Benchmark
Running local LLMs with Ollama or LM Studio feels private because your prompts never leave your laptop. However, the moment you connect a local model to MCP servers, coding terminals, email tools, or local file systems, a subtle prompt injection hidden inside a GitHub README or scraped webpage can hijack your model into running destructive shell commands.
Between November 18 and November 23, 2026, the FINAL-Bench and VIDRAFT research team released ViKernel Scanner on Hugging Face alongside a sobering benchmark report. They handed 20 widely deployed open-weight models eight mock tools—covering files, email, web requests, payments, and a local shell—and threw 100 adversarial attacks plus 20 normal work tasks at each model. Every single one of the 20 models received an F grade, with the median model attempting a dangerous tool call in 40 out of 100 attacks.
"We handed 20 open models a shell. 20 of them ran a dangerous command. ViKernel Scanner scores what a model does, not what it says." — SeaWolf-AI / FINAL-Bench Release Notes, November 2026
How Attackers Bypass Standard Local Model Refusals
Most open-weight models are fine-tuned to refuse blunt requests like deleting your home directory. Yet ViKernel's benchmark revealed that models easily fold when attackers wrap shell payloads in simple obfuscation techniques:
- Encoded Payloads: Base64, hexadecimal strings, and ROT13 commands that trick the model into decoding and piping text straight into bash.
- Reversed Text and Quote Breaks: Splitting malicious flags across variables or breaking out of quoted arguments inside tool JSON payloads.
- Indirect Prompt Injection: Malicious instructions tucked inside mock email bodies, invoice files, or web fetch results that override your original system prompt.
- False-Positive Balance: ViKernel also runs 20 benign developer control prompts so you can see whether a defensive system prompt breaks normal coding tasks.
How to Scan Local Ollama, LM Studio, and vLLM Models in 60 Seconds
Because ViKernel Scanner talks to any OpenAI-compatible API endpoint, you can audit models running locally on your Mac, Linux workstation, or Windows PC without uploading weights anywhere. The full source code is open under the Apache-2.0 license at github.com/final-bench/vikernel-scanner.
Step-by-Step Local CLI Audit
- Start your local inference server so its OpenAI-compatible `/v1` endpoint is active. For Ollama, run
ollama serve(defaults tohttp://localhost:11434/v1) and make sure your target model (such asqwen3:14borllama3.3) is pulled. - Clone the official Apache-2.0 repository from GitHub and install its lightweight Python dependencies inside a virtual environment.
- Point the scanner at your local endpoint, specifying the model name and a dummy API key (for example,
ollamaorlm-studio) since local servers do not require cloud billing keys. - Wait roughly 60 seconds while ViKernel executes the 100 attack checks and 20 benign control tasks against the 8 mock tools—no real shell commands ever execute on your machine.
- Review the terminal report card showing your A–F grade, exact dangerous tool-call rate, and which obfuscation categories (base64, hex, indirect injection) slipped past your model.
Local Endpoint Ports Reference Table
| Local AI Runtime | Default OpenAI-Compatible Endpoint | API Key Value | Typical Scan Time (120 Checks) | Best Use Case |
|---|---|---|---|---|
| Ollama | http://localhost:11434/v1 |
ollama |
45–90 seconds | Laptops, local coding agents, MCP servers |
| LM Studio | http://localhost:1234/v1 |
lm-studio |
45–90 seconds | GUI testing of GGUF & MLX quantizations |
| vLLM | http://localhost:8000/v1 |
EMPTY or custom token |
20–45 seconds | High-throughput GPU workstations & CI checks |
| Hugging Face Space | Browser Web UI | Provider API key | ~60 seconds | Quick scans of OpenRouter, Groq, or HF models |
What to Do After Your Local Model Scores an F
Do not panic if your favorite local coding model fails its first ViKernel scan—remember that all 20 reference open-weight models did too. The point of running the audit is knowing exactly where your guardrails fail before you hand an agent unrestricted shell access.
You May Also Like
Practical Hardening Steps for Everyday Developers
- Never Auto-Approve Shell Tools: Require explicit human confirmation in Cline, Continue, or Claude Code-style local harnesses before any bash or file-delete tool executes.
- Run Local Agents Inside Docker: Mount only your active project folder inside a disposable container so a hijacked shell command cannot read
~/.ssh, browser cookies, or.envsecrets. - Watch Weight-Level Defenses: The ViKernel team demonstrated that embedding their ViKernel Firewall directly inside model weights blocked 897 out of 897 dangerous tool calls before execution, signaling a major shift toward action-level safety in 2027 open models.
- Keep Ollama Patched: Remember that model-level prompt injection is separate from runtime bugs like the 2026 GGUF loader flaw (CVE-2026-7482), so always keep Ollama updated to the latest release.
Re-Scan After Every Quantization or System Prompt Change
Lower-bit quantizations (like Q4_K_M) sometimes degrade safety alignment compared to FP16 weights. Re-running ViKernel Scanner takes one minute and gives you hard proof before trusting a new quant with local tools.
Frequently Asked Questions
Can ViKernel Scanner actually run harmful commands on my computer during a test?
No. ViKernel hands your model eight isolated mock tools (shell, files, mail, web, payments) and logs what the model attempts to call without executing any real operating system commands.
Is ViKernel Scanner completely free to run locally?
Yes. Both the GitHub CLI repository (licensed under Apache-2.0) and the Hugging Face Space are completely free, and scanning local Ollama or LM Studio models incurs zero API token charges.
Does ViKernel work with cloud APIs like OpenRouter, Groq, or OpenAI?
Yes. Any service exposing an OpenAI-compatible chat completions endpoint with tool calling—including OpenRouter, Groq, Together, OpenAI, Anthropic, and Gemini—can be audited in about a minute.
Why did all 20 open-weight models fail the initial benchmark?
Standard safety training focuses on refusing harmful text replies rather than inspecting encoded or indirectly injected tool arguments, allowing base64, hex, and quote-break payloads to reach the mock shell tool.
Comments (0)
Leave a Comment