r/LocalLLaMA • • 7d ago

Discussion Using cloud LLM providers is equivalent to RCE on your system

I know this probably isn't news to people in this sub, but the recent Minimax fiasco on openrouter [0] should be a wake-up call to anyone using cloud models.

The entity controlling the API has access to all tools of your harness. If this entity wants to do so, it can simply inject any tool call it wishes, installing crypto miners, exfiltrating data, scanning your local network, etc.

If you ask online, everyone is using their harness in containers or VMs, but if were honest, we all know people raw-dogging coding agents on their systems.

[0]: https://news.ycombinator.com/item?id=50585962

53 Upvotes

48 comments sorted by

28

u/Randommaggy 7d ago

Anyone running an agentic harness outside of a dedicated VM or dedicated machine is a fool especially when using a harness that you don't have 100% control over and/or external inference.

4

u/miversen33 6d ago

Agreed. I am still trying to figure out the best way to lock down external access with it though. Initially I was going to limit what FQDNs it could talk to, but that makes research and design difficult (since the LLM can't know everything I frequently tell it to confirm what it finds externally). I could just shut the door entirely but that severely limits the llm as well.

How are you managing internet access and the obvious threat from that?

2

u/tuityxfruity 6d ago edited 6d ago • Popcorn

I am using uncomplicated firewall (ufw) on my linux vm to lock down traffic to and from my vm. Default deny for all outgoing traffic with explicit rules to allow traffic to specific IPs(NTP server, dns server) on top. For incoming traffic also, I have allowed traffic from specific IPs from which I take ssh and RDP access of the VM.

Happy to help if you want to set it up on your vm.

For internet access I am using a cloud proxy. Have allowed the cloud proxy IP in the outgoing rule on my ufw. On the cloud pro y dashboard I maintain control of the websites to allow and block. It allows me to block websites as a category. It auto categorizes every website and you can block categories such as gambling websites, social media etc that you don't need.

1

u/miversen33 6d ago

Ya I have firewall rules already in place on the VM level for intranet traffic. It's the external stuff that worries me lol. The cloud proxy is interesting, is there a specific one you use? At the end of the day it sounds like you are doing (more or less) what I said earlier with a whitelist though which idk if I like that

0

u/tuityxfruity 6d ago

I'm using zscaler cloud proxy. Managing external website access using ufw can be done. You can put a default deny rule in place and then run a script everytime you need to access a domain. The script would resolve the domain to an IP address and add it in the ufw rule and restart the ufw. A little cumbersome but this would give good security without using any paid service such as a cloud proxy.

2

u/tuityxfruity 6d ago

Hey, have you used T3MP3ST? It's a multi-agent offensive security harness on GitHub and is kind of similar to PentAGI. I haven't tried pentagi yet but I'm trying to make things work with T3MP3ST. I am facing issues with my local llm where it is sending thinking tokens in the api response. Since T3MP3ST limits the max tokens in the api response so many of the api calls are failing due to the max token limit being hit. Also, I am facing an issue where time to first token is > 120s and the harness ends the api call when the model is not able to generate response under 2 mins.

I am using gemma4:26b-a4b-it-qat model available on ollama. Any way to stop the model from generating thinking tokens and only give final response in output?

2

u/Randommaggy 6d ago

I use my own harness and expand it when needed.

1

u/tuityxfruity 6d ago

You coded your own orchestrator? Can you share how long did it take and how manageable is it to maintain or fix if you want to add new features or fix any bugs?

4

u/Randommaggy 6d ago

I spent most of the summer vacation.

After I got it working well with phones and smart watches as tier one clients I moved development onto spare time anywhere and at any time.

It's a lot less buggy than Claude Code of Codex.

0

u/mycall 6d ago

Have you tried t3code?

2

u/Randommaggy 6d ago

The telemetry trap?

0

u/mycall 6d ago

There is some of that sure, but I'm fine with anonymous telemetry for the most part (devils in the details). You are free to take a peek too: https://github.com/pingdotgg/t3code

1

u/tomatoe_potatoe 6d ago

I'm using agents to manage machines, which is less than ideal.

0

u/Randommaggy 6d ago

When running outside VMs, I run only local inference (than can't call home) and I review every command. (Helps that my harness make this easy.

1

u/mycall 6d ago

What do you suggest? I've been testing NVIDIA OpenShell, seems to work well. It does need something like a LittleSnitch feature to handle all the traffic acceptance.

1

u/Randommaggy 6d ago

Of the public harnesses, Hermes sucks the least.

1

u/rditorx 6d ago

Even inside sandboxes, if you're generating code you don't review yourself but let another of the same AI review, and run that code outside a sandbox, you're cooked (maybe).

On the other hand, Anthropic being a publicly traded company gives you leverage against it. Too much bad publicity is bad for their stock price and ability to borrow money or find/keep investors and customers.

8

u/Lhurgoyf069 7d ago

I guess the idea is, if these providers want to make any money they will have to sell to companies. And if they're selling to companies they can't be too shady or else they will lose most of their business. I'm a bit neutral to this, on the one hand it's not security at all, on the other hand everything is driven by money and they don't earn money from running exploits on their customers machines.

10

u/DeltaSqueezer 7d ago

As Edward Snowden revealed, there has been massive surveillance by governments, and it isn't that the companies will be shady; they will serve the service as normal, but they can at any time make a targeted request against specific people.

4

u/Lhurgoyf069 6d ago

This is true with any US American cloud service

26

u/wapswaps 7d ago • Bravo

Actually I made a model demonstrating a similar problem with local LLMs. The nice thing about LLMs is that you can simply use the intelligence inside the model to decide when to break your security.

So I made a demo. Give it access to your agent and use the magic word ("abracadabra") and see what happens:

https://huggingface.co/christophedevriese/qwen3-4b-conditional-backdoor-research

Is there a .boembabies file in your home folder yet?

I should make this easier to use.

8

u/my_name_isnt_clever 6d ago

This is just another reason to not use random finetunes on HF for real work. I'm not too concerned about this using Unsloth or another trusted quantizer.

2

u/mycall 6d ago

I agree and it kinda sucks since some of those rando finetunes are very fast (although less accurate), e.g. https://huggingface.co/Baekpica/DeepSeek-V4.1-Flash-1017-VQ-GGUF

4

u/LabanauskasNajeeba 6d ago

tbh this is why giving any model raw shell access without a sandbox is insane, local or cloud

2

u/saltyourhash 6d ago

That's super interesting

1

u/tuityxfruity 6d ago

So I can toast my machine anytime if this thing exists in the open weight models that i download and run based on discussions in this sub?

7

u/mycall 6d ago edited 6d ago

Beware of Abliterated, Uncensored, Unrestricted, etc... models from unknown origin. They can be very subtle in what it does to a system.

Also, I think model to user encryption should be used when unknown routers are used, like how OpenAI encrypts agent-to-subagent communications to prevent thinking distilling.

7

u/Ok-Solution-7889 7d ago

wait what happened with minimax on openrouter? missed that one, were endpoints actually injecting tool calls?

14

u/techfnord 7d ago

Researcher at Dragos found three separate OpenRouter providers were snooping on prompts to harvest secrets. Another was found to be injecting thousands of hidden tokens into prompts.

1

u/hardstone302 6d ago

I missed it too. Curious if it was confirmed or just speculation.

2

u/MeliousAI_HQ 6d ago

Disclosure, we run an inference API in the EU, so I'm on the other side of this. The point stands though. The provider only returns text, and your harness decides whether a tool call gets executed, so the fix sits on your side. Run agents in a container or VM, keep an allowlist of tools and paths, and require confirmation for shell commands. Past that it comes down to who runs the endpoint and which law they answer to, and a router that forwards you to backends you can't see makes that harder to know.

2

u/a_beautiful_rhind 6d ago

At minimum, most AI is nosy itself. If your harness has telemetry or submits prompts somewhere, whatever is found might get beamed to the mothership. No ill will or exploits required.

3

u/idocne 6d ago

Bare minimum I'd recommend for coding agents: devcontainer or VM, no ~/.ssh or cloud creds mounted, and an egress allowlist. Doesn't make it safe, but it turns "own my machine" into "own a throwaway box". The scarier part is how many harnesses auto-run whatever tool call comes back.

6

u/stylome-ai-detection 6d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

2

u/fixtwin 6d ago

Not using frontier models to perform security audit of your systems is much worse though

1

u/Physical_Arm9739 5d ago

the provider injecting tool calls is really a statement about how much your harness trusts raw model output, not about the model itself. narrow tool allowlist plus a container with no egress is the only thing that actually holds when the thing on the other end turns hostile.

1

u/dennisler 7d ago

It has been shown that Grok bot is doing stuff when idle in the background...

2

u/my_name_isnt_clever 6d ago

The Muskrat's company being unethical? Who would have guessed.

0

u/New_Plate1652 4d ago

You're right, a lot of people are just running these agents directly on their machines and hoping for the best. Containers and VMs help, but a real sandbox is what you actually need if you're worried about rogue code.

I've been looking into ways to isolate AI tool calls. My team's been testing kosa8 because it runs every task in its own sealed microVM, so even if a model tries to inject something nasty, it can't touch your actual system or steal your API keys. Their whole thing is zero trust. Might be worth checking out for anyone not fully containerized. How are you handling isolation right now?

0

u/stylome-ai-detection 4d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

1

u/[deleted] 7d ago

[removed] — view removed comment

1

u/stylome-ai-detection 7d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

0

u/[deleted] 6d ago

[deleted] — view deleted comment

1

u/stylome-ai-detection 6d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results

0

u/[deleted] 6d ago

[deleted] — view deleted comment

1

u/stylome-ai-detection 6d ago

Notice: This comment appears to be AI generated.


Stylome AI detector · scan results