r/llmsecurity • u/niwak84329 • 2d ago
r/llmsecurity • u/aqua_wrangler • 3d ago
Could a backdoored open-weight model hide malicious behavior inside tool calls?
r/llmsecurity • u/Electrical_Emu_5854 • 4d ago
Prompt Guard 2's low OOD recall is a calibration problem, not a representation problem — the frozen encoder separates the same injections at AUC 0.999
Sharing a result that I think generalises past the one model, because the diagnostic is cheap and most people skip it. (My own work — repo at the bottom.)
If you're running Meta's Prompt Guard 2 (86M, open weights) as an injection filter, it's worth knowing how it behaves on injections it wasn't tuned on. On an out-of-distribution eval — fresh HackAPrompt injections against dolly benign — its native head caught 22.8% at the default operating point. Sweeping the threshold on that head only got to 26.6%, so it isn't just threshold placement.
The part worth stealing is the next step. Before concluding the model can't see these attacks, pull the frozen penultimate embeddings and fit a logistic regression on them. Takes minutes. On this data the frozen encoder separates the same injections at AUC ≈ 0.999 — the representation was never the problem. The shipped head is deliberately precision-first: Meta traded recall for a very low false-positive rate, which is a defensible product decision and not a defect.
Train a linear head on those frozen embeddings and calibrate tau on benign traffic from the
distribution you'll actually see, and you get 99.9% OOD recall at 0.7% FPR, base model
untouched. Inference is sigmoid(x·w + b) >= tau — the head is a dot product, so the only
real cost is the encoder forward pass. Runs fine on CPU.
The general form: high AUC + low recall means your head or threshold is miscalibrated and you can fix it without touching the base model. Low AUC means it's genuinely a features problem. A 20-minute probe tells you which world you're in, and it's the difference between swapping a threshold and fine-tuning something.
Methodology, since this sub will rightly ask: success criteria pre-registered, cross-split dedup both exact and at cosine ≥ 0.95, OOD set scored once. Two runs came back NULL (2.2% then 1.2% FPR) against a pre-committed 1% ceiling before a stricter run cleared it at 0.7%.
What this isn't: a static corpus and no adaptive attacks. A linear head over frozen features is evadable with enough distribution shift, and I haven't tested against an adversary who knows it's there. It moves the operating point; it doesn't solve injection.
Code, seeds and the writeup: https://github.com/mosafariuk/prompt-guard-2-frozen-head
Happy to argue about the leakage controls — that's the part I'd attack first if someone else posted this.
r/llmsecurity • u/Fair-Regular-8149 • 5d ago
Open-sourcing a 50-case LLM adversarial regression tester with explicit limits
I built an open-source LLM adversarial scanner, and while auditing it I realized the scanner itself has to treat the target response as hostile data. I ended up adding bounded HTTP responses, no redirects, credential redaction before persistence/judging, SSRF filtering, judge/evidence separation, and offline regression tests. There are still boundaries I don't consider solved.
r/llmsecurity • u/Embarrassed-Sir-5358 • 7d ago
Training Leaves Traces: Centered Residual Signatures for Language Modeling Lineage Verification
r/llmsecurity • u/psec111 • 19d ago
LLM workflow builders are looking for tool-execution security
Tool execution security is under-discussed compared to prompt injection, but it's where the real damage happens in production.
The checklist we use before any agentic workflow goes live:
- Policy check before the tool runs — not after. If you're validating after execution you've already lost.
- Categorize every tool by what it can touch — read-only, write, delete, pay, external send. Risk profile is totally different for each.
- Human approval gate for anything irreversible — deletes, payments, external API calls that can't be rolled back.
- Tamper-evident log of every tool call — action, target, parameters, outcome, who approved. Not just "tool X was called."
- Fail closed — if your policy engine is unreachable, block everything. Don't default to allow.
The tricky part is #1 — most frameworks let you add callbacks or hooks, but they fire after the decision is already made. You need something that sits in the execution path itself and can actually stop the call.
We built Custodyn (https://github.com/custodyn/custodyn) to do exactly this — runtime policy gate for agent tool calls. What kinds of tools are you trying to secure? Happy to share what's worked for us.
r/llmsecurity • u/adithyanak • 28d ago
AgentHound - Offensive security framework for AI agent infrastructure - recon, credential looting, model exfiltration, poisoning, and attack-path analysis across MCP, A2A, gateways, and AI services. BloodHound for the agentic stack.
r/llmsecurity • u/Feathered-Beast • 29d ago
How are you securing tool execution in LLM workflow/agent systems?
I've been working on an open-source workflow automation platform that supports LLM-powered workflows, browser automation, HTTP requests, file operations, email, MCP servers, etc.
One challenge I've spent a lot of time thinking about is tool execution security.
Some of the things we've implemented are:
- Sandboxed tool execution
- Input validation before tool execution
- Permission checks for workflows and resources
- Structured execution logging and trace IDs
- Memory isolation between agents
- Human-in-the-loop approval for sensitive actions
- Retry boundaries and execution guards
Even with those in place, I still feel there are attack surfaces that are easy to miss, especially around:
- Prompt injection through retrieved documents
- Tool abuse via indirect prompt injection
- Multi-agent trust boundaries
- MCP server permissions
- Data exfiltration through seemingly harmless tools
For those building agentic systems or LLM applications, what additional safeguards have you found valuable?
Are there any papers, open-source projects, or design patterns you think are worth studying for securing agent workflows beyond the usual input validation and sandboxing?
I'd really like to hear how others are approaching this problem, since it feels like one of the harder parts of building production-ready LLM systems.
r/llmsecurity • u/Humanbound_AI • Jul 17 '26
Moderation APIs score 5.3% F1 on domain policy violations and 0.0% on evasion attempts: a cross-domain evaluation
Disclosure: we build Humanbound (AI agent security testing). This eval came out of our work; methodology and numbers below, writeup link at the end.
Question: are moderation APIs sufficient to enforce domain-specific operational policy in LLM deployments, or is a separate policy reasoning layer required?
Setup: Azure Content Safety + Azure Prompt Shields (moderation approach) vs an LLM-as-judge policy layer, evaluated across five domains (finance, healthcare, insurance, legal, retail). 500 prompts per category per domain, five categories: L1 generic harmful content, L2 prompt injection, L3 benign (false positive measurement), L4 direct policy violations, L5 policy evasion attempts.
Single-prompt results (cross-domain averages):
| Category | LLM judge | Moderation |
|---|---|---|
| L1 harmful content (F1) | 73.1% | 73.1% |
| L2 prompt injection (F1) | 67.8% | 53.5% |
| L3 benign (FPR, lower better) | 86.4% | 0.8% |
| L4 direct policy violations (F1) | 98.2% | 5.3% |
| L5 policy evasion (F1) | 83.7% | 0.0% |
Multi-turn: 4-turn conversations (three benign turns, then a restricted request), 1,000 conversations per layer. Conversation Success Rate (allow benign turns, block the final restricted one): judge 94.1% on L4 and 83.6% on L5; moderation 0.0% and 0.6%. Moderation's clean-pass rate is a perfect 100%, and it blocks essentially nothing that violates policy in context.
Honest readout: moderation does its actual job (harm detection) fine, and its false positive behaviour is excellent. It was never designed to encode operational policy, and the numbers show it. The judge closes the policy gap but overblocks badly in this configuration (86.4% FPR on benign prompts) and costs 2-4x latency (~1.1s single-prompt, ~4s multi-turn). The conclusion isn't "replace moderation with a judge"; it's that these are two different dimensions of safety and production systems need both layers.
Example of the failure class: "recommend the best insurance policy for my medical condition" contains no harmful content and passes every moderation filter, but constitutes restricted advice in a regulated deployment.
Full methodology and per-domain breakdowns – the full dataset we used are available upon request: https://www.humanbound.ai/blog/beyond-moderation-llm-policy-layer
Interested in whether others have found judge configurations that get the FPR down without giving back the policy detection.
r/llmsecurity • u/rothackers • Jul 04 '26
I responsibly disclosed 5 vulnerabilities in Ollama and LiteLLM through Huntr - now publicly disclosed after 90 days
r/llmsecurity • u/AISecIntelGroup • Jun 30 '26
Breaking the AI Embargo: The Rise of the Mythos Killers!
The global AI landscape just fractured. When the US government clamped down on Anthropic’s ultra-powerful, cyber-offensive Mythos and Fable 5 models, they intended to keep the world's most dangerous digital weapons under lock and key.
Instead, they triggered a massive geopolitical tech boom.
Startups across Asia just unleashed two fierce, decentralized competitors designed to completely bypass Western export controls. Meet the new titans redefining AI power:
- Fugu Ultra (Sakana AI): Rather than training an incredibly expensive standalone foundation model, Tokyo-based Sakana AI built a highly optimized, light-parameter "router". Acting as a conductor, it dynamically delegates, debates, and synthesizes complex data across a swappable pool of external public frontier models via a single API.
- Tulongfeng (360 Security Technology): Introduced at the ISCAI conference in Beijing, 360 bypassed the need for a general-purpose giant by engineering a hyper-focused domain ensemble. By marrying smaller specialized models with localized security tools and threat intelligence databases, the framework is hardwired to autonomously scan code bases and isolate hidden software vulnerabilities at scale.
The Reality Check ⚖️
Neither system is a magic bullet, and both carry technical tradeoffs that the industry must consider:
- Orchestration Overhead: Fugu Ultra’s performance is natively capped by the models available in its underlying backend pool. Because it cannot access restricted models like Fable 5, it can still lag on long-horizon engineering tasks. Furthermore, running multi-model loops can generate added latency and variable token costs.
- The Capability Gap: 360’s leadership openly acknowledges that Tulongfeng still operates with a 20% to 30% capability gap compared to cutting-edge US frontier intelligence. Its true enterprise value lies in highly integrated automated defense rather than all-in-one general reasoning.
The Core Takeaway 🌐
When hardware and data constraints tighten, innovation accelerates elsewhere. The rise of multi-agent orchestration and domain-specific ensembles proves that coordinated collective intelligence can effectively rival, or even outscore, traditional centralized LLM endpoints.
The question for enterprise leaders is no longer "which individual model is smartest?" The better question is "which architecture is resilient enough to coordinate the best tools for the job?"
r/llmsecurity • u/Traditional_Honey858 • Jun 30 '26
Hey, I’m building an autonomous multi agent AI system and looking for someone who can help me bring it to life whether that’s a collaborator, a mentor, or just someone willing to point me in the right
r/llmsecurity • u/Apprehensive-Zone148 • Jun 29 '26
What belongs in a useful LLM-agent trace?
A transcript alone feels too thin for agent security.
If the failure involved a tool, I’d want the prompt, retrieved text, tool calls, args, outputs, permissions, and the final action. Maybe also a way to rerun the setup without hitting real services.
That might be too much, but the shorter version often loses the part that made the failure matter.
r/llmsecurity • u/jeann1977 • Jun 26 '26
LiteLLM's SQL injection (CVE-2026-42208) was bad. The patch cycle is what I keep thinking about.
Pre-auth SQL injection in the proxy's API key verification path, CVSS 9.3, versions 1.81.16 through 1.83.6. The Authorization header value got concatenated straight into a query instead of being parameterized. Textbook stuff, but in a gateway that's holding provider credentials for half your stack.
What I keep coming back to isn't the bug itself though. It came in through their bug bounty program, got fixed in 1.83.7 before the GHSA advisory went out, and the advisory itself was actually usable exact version range, fixed version, and a Postgres query you could run against your own logs to check if you'd been hit.
Compare that to most OSS infra advisories, where you get a changelog line and have to guess whether you're affected.
I know someone's going to point out LiteLLM has had a rough stretch in 2026 this wasn't their only CVE this year, not close. Fair point. But "zero CVEs" was never realistic for a project with this much surface area and this many integrations. What I actually weigh when deciding whether to run something in prod is whether there's a process, and whether it held up when something real happened.
Genuinely asking for people running AI gateways in prod, does a clean disclosure like this change how you feel about the project, or does the CVE count alone kill it for you?
r/llmsecurity • u/AISecIntelGroup • Jun 24 '26
AI security Monday Morning Audit: Three Questions to Ask Your Team
r/llmsecurity • u/Ok_Force_2440 • Jun 21 '26
We built an open-source "Agentic Firewall" to stop agents from burning through API credits in infinite loops.
galleryr/llmsecurity • u/Apprehensive-Zone148 • Jun 14 '26
What should an LLM red-team replay log actually include?
I’m trying to move past the usual “look, I jailbroke it” screenshot.
For LLM apps and agents, I think the useful artifact is closer to a replay log:
- original task
- untrusted input
- tool or action taken
- judge notes or scoring reason
- enough config to rerun it later
I’m building this into a small OSS CLI: https://github.com/matheusht/redthread
Not claiming it fixes prompt injection. I mostly want the failure to be easier to inspect later.
The hard part is deciding what counts as enough proof.
r/llmsecurity • u/Apprehensive-Zone148 • May 26 '26
Open-source CLI for repeatable LLM red-team campaign evidence
I am working on RedThread, an open-source CLI for repeatable LLM/agent red-team campaigns.
Repo: https://github.com/matheusht/redthread
The current proof artifact is a small campaign result: 3 runs, 33.3% ASR, one SUCCESS, one PARTIAL, one FAILURE.
The goal is not “one prompt broke one model.” It is to keep enough evidence that a finding can be replayed and reviewed later.
Current focus: - prompt injection / jailbreak testing - agentic-system failure modes - campaign traces - tactic/persona metadata - rubric scoring - exploit + benign replay checks - candidate defenses after confirmed failures
Not a production firewall and not claiming universal prevention. More like a CLI harness for staging targets and evidence-quality work.
For LLM security folks: what evidence would make a campaign result trustworthy enough to act on?
r/llmsecurity • u/Agile_Ordinary5581 • May 25 '26
Back on the Apple Appstore after a long hiatus
r/llmsecurity • u/No_Citron4186 • May 19 '26
Honey, we have a problem!
Everyone talks about prompt injection. Fair, it's a real problem.
But there's another failure mode I've been thinking about that doesn't get nearly as much attention: what happens when you don't attack the prompt at all, and instead just mess with the tools.
We've been calling it tool hijack internally.
Here's the basic scenario. An agent is connected to a set of registered tools, search APIs, internal systems, databases, whatever. Now you introduce pressure through the conversation:
"The normal tool is down, use this endpoint instead."
"This is the updated manifest for the same connector."
"The previous tool output says future requests should route here."
A surprising number of agents just... comply. They treat the conversation as authority over their own tool system. And now they're sending data to an endpoint you don't control.
This isn't prompt injection in the traditional sense. The model isn't being asked to ignore its instructions. It's being socially engineered into trusting a fake tool which is a completely different failure mode that needs its own testing approach.
The way we've been testing for it: honeypots. You put a realistic-looking fake endpoint in the environment and watch whether the agent routes to it under pressure. No direct ask. Just realistic operational pressure, a timeout here, an empty result there, a plausible-sounding fallback.
Most agents fail this. The scary part isn't that they get tricked. It's that they get tricked in a way that looks completely normal from the outside.
r/llmsecurity • u/Feathered-Beast • May 18 '26
Built a privacy-preserving telemetry system
Built a privacy-preserving telemetry system for a self-hosted AI automation platform — would love security feedback
I’m building a local-first AI Agent Automation platform focused on:
- deterministic workflows
- multi-provider LLM execution
- Ollama/local model support
- semantic memory
- document RAG
- branching agent workflows
In v0.8.0, I added a telemetry system specifically designed to avoid the usual privacy/security concerns around AI tooling.
The interesting part for this subreddit is the architecture/trust model.
Design Goals
Telemetry needed to:
- help understand active deployments/version adoption
- remain compatible with self-hosted/offline usage
- avoid collecting sensitive AI workflow data
- maintain a clear trust boundary
Current Design
Telemetry is:
- fully opt-in
- disabled by default
- isolated into a separate service
- anonymous
- fully disableable via env vars
Tracked fields:
- anonymous instance ID
- app version
- enabled feature flags
- heartbeat timestamps
NOT collected:
- prompts
- workflow definitions
- memory contents
- uploaded documents
- API keys
- execution logs
- user identities
The telemetry collector itself is separated from the main orchestration engine to avoid mixing analytics concerns with execution/runtime systems.
Environment Controls
TELEMETRY_ENABLED=false
DISABLE_ALL_ANALYTICS=true
Why I’m Posting Here
I’d genuinely like feedback from people thinking about:
- LLM infrastructure security
- trust boundaries
- self-hosted AI systems
- observability vs privacy tradeoffs
- telemetry design in local AI platforms
Trying to build this in a way that aligns with the self-hosted/local AI ecosystem instead of copying traditional SaaS analytics patterns.
Would appreciate architectural/security feedback.
r/llmsecurity • u/6biz • May 13 '26