🤖 AI Hot

MosaicLeaks Exposes How AI Research Agents Leak Secrets

A
Alex Chen

Here’s a scenario that should make enterprise security teams uncomfortable. A research agent at a healthcare company is working through a routine question. Along the way, it fires off a handful of ordinary-looking web searches. One references a cloud-migration milestone. Another mentions a January 2024 security disclosure. A third narrows down which vendor took the hit.

No single query gives away the whole secret. But anyone watching the agent’s outbound traffic can reassemble the fragments: the company had migrated 70% of its infrastructure to the cloud by January 2025 — a fact that lived only in private documents.

This is the mosaic effect, and according to research published this week by ServiceNow on the Hugging Face blog, it’s a failure mode that affects every deep research agent they tested. The more capable the agent, the worse the leakage got.

The problem: agents that search are agents that leak

Deep research agents are one of the most useful AI patterns to emerge in the past year. They combine private local documents with external web search to produce comprehensive reports, answer multi-hop questions, and synthesize information from sources that a human researcher would take hours to assemble.

The architectural pattern is simple: the agent has access to private documents and a web search tool. It decomposes complex questions into sub-questions, searches for public information where needed, and draws on private data where available. The output is more thorough than either source alone could produce.

The privacy problem is baked into this pattern at the architecture level. Every web search the agent makes is an outbound signal. If the agent is working with sensitive proprietary information, its search queries necessarily reflect that sensitivity — otherwise it couldn’t effectively combine public and private sources.

ServiceNow’s research team formalized this as the “mosaic leakage” problem: the adversary never sees the private documents or the agent’s reasoning, only the cumulative query log. From those fragments, they attempt to reconstruct private facts.

MosaicLeaks: a benchmark with teeth

The researchers built a benchmark called MosaicLeaks with 1,001 multi-hop research chains. Each chain interleaves public and private sub-questions in a way that mimics real enterprise research tasks. An agent has to answer every sub-question correctly (the strict chain success metric) while using web search only when the information isn’t available in private documents.

The catch is that the agent doesn’t always know which information is public and which is private — it has to figure that out dynamically, the same way a real enterprise agent would. That’s where the leakage happens.

The benchmark measures three types of leakage, each representing a more serious privacy failure:

Intent leakage is the mildest form. The adversary, seeing only the agent’s search queries, can infer what the agent was investigating. If the queries show the agent was researching a merger, a product recall, or a regulatory investigation, that’s already useful intelligence even without knowing the specific findings.

Answer leakage is worse. Given the query log plus specific questions about private information, the adversary can answer those questions without access to the private documents. The search trail alone contains enough signal.

Full-information leakage is the worst case. With only the query log, the adversary can discover and state verifiably true private facts without being told what to look for. This is the mosaic effect in its most dangerous form: the fragments, when assembled, reveal secrets the agent never meant to share.

The uncomfortable finding: better agents leak more

This is the result that should make people pause. The researchers tested multiple models and found a consistent pattern: optimizing the agent purely for task performance made the leakage worse. Agents that were better at answering questions correctly were also better at giving away private information through their search behavior.

It’s not a coincidence. A more capable agent makes more targeted, more specific web searches. It knows exactly what gap in its knowledge needs filling, so it crafts queries that precisely target that gap. Those precise queries are exactly what an adversary needs to reconstruct the private context.

The numbers tell the story. Before any privacy-aware training, strict chain success — the share of chains where every hop is answered correctly — sat at 48.7%. Answer and full-information leakage was at 34.0%. When the team trained agents purely for task performance, the success rate improved, but leakage increased. Better performance was buying worse privacy.

PA-DR: training agents to search safely

The solution the team developed is called Privacy-Aware Deep Research, or PA-DR. It’s a reinforcement learning method that adds leakage penalties to the reward function. Agents are still rewarded for correct answers, but they’re penalized when their search queries reveal private information.

The results are encouraging. PA-DR raised strict chain success from 48.7% to 58.7% — a meaningful improvement in accuracy. Meanwhile, it drove full-information leakage down from 34.0% to 9.9%. The agent got better at its job and better at keeping secrets, simultaneously.

The paper describes this as a “situational reward” approach. The agent learns when private information is in play and adjusts its search behavior accordingly. It doesn’t stop searching — that would defeat the purpose of a deep research agent. Instead, it learns to formulate queries that extract the needed information without exposing the private context that motivated the query.

Why reinforcement learning is the right tool for privacy-aware behavior

The reason PA-DR works where simpler approaches fail comes down to the nature of the problem. You can’t just write a rule that says “don’t include private information in search queries,” because the agent doesn’t always know what’s private. Private and public information are interleaved in the research chain, and the agent’s job is to figure out which is which dynamically. A rule-based approach would inevitably be both too restrictive (blocking legitimate searches) and too permissive (missing subtle leakage patterns).

Reinforcement learning handles this naturally because it works on outcomes rather than rules. The agent discovers through trial and error which search behaviors produce correct answers while avoiding leakage penalties. Over many training episodes, it develops heuristics that a human designer would struggle to codify: when to generalize a query rather than specifying the exact entity, how to chain public facts together without revealing that those facts were assembled to answer a private question, when to skip a search entirely because the answer can be inferred from public sources.

The 9.9% residual leakage rate is worth understanding too. It’s not that the agent is still leaking private information 9.9% of the time in the remaining chains. The metric measures leakage across all chains, and some chains are inherently harder to de-leak than others. Chains where the private information is highly specific — a unique product name, a distinctive financial figure, an unusual corporate structure — are harder to search for without revealing. The 9.9% represents the floor given current techniques, not a ceiling that can be breached with more training.

What enterprise security teams should do with this information

If you’re running deep research agents in production — or planning to — there are practical steps this research points toward. First, assume that your agents’ search queries are observable. They probably are, even if you haven’t thought about it. Search engine logs, DNS records, network monitoring — these are standard visibility surfaces that most enterprise environments already collect. The mosaic effect means that individually innocuous queries become collectively revealing.

Second, audit your agents’ query logs against your internal documents. Before MosaicLeaks, this kind of audit was hard to justify because there was no established methodology for determining whether a query log contained private information. The benchmark provides a framework: look for search terms that, when assembled, would allow an observer to reconstruct facts that exist only in private documents. You probably don’t need the full PA-DR training pipeline to get value from this. Even a manual review of agent query logs by someone familiar with the organization’s sensitive information can surface patterns you didn’t know were leaking.

Third, and this is the uncomfortable part, recognize that making your agents better at their jobs might make them worse at privacy. The finding that task-performance optimization increases leakage isn’t a theoretical concern — it’s the empirical result. If your team has been iterating on prompt engineering to improve agent accuracy without measuring query-log privacy, you may have been trading privacy for performance without realizing it. MosaicLeaks gives you a way to measure that tradeoff.

What this means for the agent ecosystem

The broader significance of this research goes beyond enterprise privacy. As AI agents become more autonomous and more integrated into organizational workflows, the surface area for unintended information disclosure grows. Today it’s web search queries. Tomorrow it’s API calls, database lookups, code execution logs, message routing decisions. Each of those channels carries information about what the agent is doing and why, and that metadata is often more revealing than the agent’s final output.

The PA-DR approach points toward a general principle: privacy-aware training for agent tool use. The specific leakage channel (web search) and penalty structure are particular to MosaicLeaks, but the idea — that agents can learn to use tools in ways that minimize information disclosure — applies across the board. An agent that learns to query a database without revealing which records it needs, or to call an API without exposing the business logic that prompted the call, is following the same pattern.

ServiceNow open-sourcing this work through Hugging Face is also significant. Enterprise AI companies have historically treated security research as proprietary competitive advantage. Publishing a benchmark, a training methodology, and clear failure-mode analysis makes it harder for organizations to ignore the privacy problem and easier for the research community to build on these results. That’s the right approach for a problem that affects everyone building agentic systems, not just one company’s customers.

The practical implications for enterprise AI

Most companies deploying AI agents today are not thinking about mosaic leakage. They’re focused on whether the agent produces correct results, whether it’s fast enough, and whether it integrates with existing tools. Privacy assessments, when they happen at all, tend to look at whether the agent’s training data or local document access is properly secured, not at the information leaking through the agent’s tool-use behavior.

MosaicLeaks shows that this is a blind spot. An agent with properly secured document access and no data exfiltration vulnerabilities can still leak sensitive information through perfectly ordinary web searches. The searches themselves are the leak.

For regulated industries — healthcare, finance, legal, defense — this is the kind of finding that should trigger a privacy review of any production deep-research deployment. If your agent is combining internal documents with web search, you should assume that an observer watching the query log can reconstruct fragments of your private information.

The PA-DR results offer a path forward. Privacy-aware training can meaningfully reduce leakage without sacrificing accuracy. The 9.9% residual leakage rate isn’t zero — and for the most sensitive applications, even single-digit leakage may be unacceptable — but it’s a dramatic improvement over the baseline. For most enterprise use cases, the PA-DR results suggest that deep research agents can be both useful and reasonably private.

What the research doesn’t cover

The paper is careful about its scope. MosaicLeaks focuses on web search as the leakage channel, but real agents use many tools: code execution, API calls, database queries, email and messaging. Each of those is a potential leakage surface that the current benchmark doesn’t address.

The experiments also assume a fixed set of private documents and a clean separation between public and private information. Real enterprise environments are messier. Documents get misclassified, permissions are inconsistently applied, and the boundary between internal and external information shifts over time.

The 1,001 chains in MosaicLeaks are representative but not exhaustive. Different industries have different information structures and different sensitivity patterns, and a benchmark that captures healthcare and technology scenarios won’t necessarily capture the failure modes of a legal or financial agent.

These aren’t criticisms so much as they are acknowledgments that privacy in agentic AI is a deep problem with a lot of surface area. MosaicLeaks opens a door that the rest of the field now needs to walk through.

I keep thinking about that healthcare company scenario from the paper. The agent wasn’t being careless. It wasn’t dumping private documents into public search results. It was doing exactly what it was designed to do — combining internal knowledge with external research to produce better answers. And in doing exactly its job well, it was leaking. That’s the kind of problem that doesn’t get caught by security reviews looking for the wrong thing. MosaicLeaks gives us a framework for looking for the right thing instead.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen