OWASP LLM02:2026 Sensitive Information Disclosure: gating what agents send

Most leaks happen inside an answer, so scope retrieval and redact every channel first. Then give each outgoing email, upload or export a risk name your rules can gate.

· 8 min read

LLM02:2026 Sensitive Information Disclosure keeps its place and its name from the 2025 list. OWASP defines it as an LLM-integrated system exposing “confidential, regulated, privileged, or proprietary data through a channel the data subject, controller, or system owner did not authorize.” The 2026 entry widens what counts as a channel: “tool-call arguments, reasoning traces, retrieved chunks, multimodal output, logs, telemetry, embeddings” and even timing and token length.

An approval step does little for most of that. A leak inside an answer, a trace or an embedding never asks anyone first. This page starts with the controls that do the work, then shows the one place a gate earns its keep: an agent action that carries data out.

Where an agent leaks

OWASP sorts disclosure into four phases: training-time memorisation, inference-time exposure of live context, pipeline-time copies into derived artifacts, and observation-time inference from things like latency. It names two structural failures behind most incidents: oversharing upstream, where unscoped drives feed retrieval with data the model then returns “as designed”, and persistence in weights, embeddings and adapters after the source is deleted.

An agent adds a fifth kind of exit. The answer can be clean while a tool call sends the records somewhere:

Messages
An email, chat or ticket reply to an outside address, with customer data in the body or an attachment.
Files
An upload to a third-party service, or a share link that anyone with the URL can open.
Calls
A webhook or API request whose payload carries records to a system that should not hold them.
Cross-customer replies
A support reply that quotes another customer's order, address or ticket.
Arguments
A tool call whose arguments carry a key or a token, logged in full by your tracing.

OWASP itself says that where the model acts as an autonomous actor, with tool choice and multi-step exfiltration, the amplified risk is owned by the Agentic Top 10. This entry covers the model as a component, which is why most of its mitigations sit before and around the model.

Most of the fix comes before the model

Tier 1 of the mitigations applies to every deployment. The ones that matter most for an agent:

  • Govern corpora (1). Provenance, classification and deduplication, with PII scrubbed at ingest.
  • Minimise context (2). Send only task-required fields and turn off auto-context such as a full-record append.
  • Authorise before retrieval (3). Enforce access “inside the index query, not at the application layer after retrieval.” A filter after generation cannot take back a chunk the model has already read.
  • No secrets in system prompts (4). Scenario #4 is an injection that makes a support bot print its prompt and the vendor API key inside it.
  • Classifiers, not regex alone (5). OWASP warns that regex and blocklists “fall to cross-lingual, base64, and hex encodings.”
  • Clean logs and traces (7). Scrub before anything reaches APM. Tier 2, mitigation 4 adds: “Never log raw traces to unrestricted observability.”

In code, the first three and the last come down to a filter in the query, a short list of fields, and one function that everything bound for your logs passes through:

// Tier 1, mitigation 3: the permission check is part of the index query,
// so a chunk the asker may not read never reaches the model.
const chunks = await index.search(question, {
  k: 8,
  filter: { tenant_id: user.tenantId, readers: { anyOf: user.groupIds } },
});

// Mitigation 2: only the fields this task needs, never the whole customer record.
const context = chunks.map((c) => ({ title: c.title, text: c.text, source: c.sourceId }));

// Mitigation 7: one place where everything bound for logs and APM is cleaned.
// Tool arguments, tool results and reasoning traces are outputs too.
function trace(event: AgentEvent) {
  apm.send({
    run: event.runId,
    tool: event.tool,
    toolArgs: redact(event.toolArgs), // your classifier and patterns, not regex alone
    toolResult: redact(event.toolResult),
    reasoning: redact(event.reasoning), // Tier 2, mitigation 4
    output: redact(event.output),
  });
}

Scenario #3 shows why the last part matters: extended-thinking traces logged verbatim to a shared APM project expose retrieved PII to hundreds of engineers “while the answer stays sanitized.” What to keep and what to hash in your own tool-call log is covered in audit logs for AI agent tool calls.

Give each outgoing action a risk name

Tier 2, mitigation 6 asks for “strict internal-versus-external routing separation and field allowlists on the external path.” For an agent that sends things, that separation can be the name of the action. Your code looks at the draft, not at what the model says about it, and picks one name per risk:

// Your code, not the model, decides how risky an outgoing message is.
const OUR_DOMAINS = new Set(["example.com", "example.co.uk"]);
const BULK_ROWS = 50;

async function classify(draft: Draft) {
  // Exactly one bare address per entry: "evil@evil.io,ceo@example.com" is refused, not split.
  const recipients = [...draft.to, ...draft.cc, ...draft.bcc].map((a) => a.trim().toLowerCase());
  if (!recipients.every((a) => /^[^\s@,;<>"']+@[^\s@,;<>"']+$/.test(a))) {
    throw new BadDraft("each recipient must be one plain address");
  }
  // Exact match on the part after the last @: "example.com.evil.io" is outside.
  const external = recipients.filter((a) => !OUR_DOMAINS.has(a.slice(a.lastIndexOf("@") + 1)));

  // Your own DLP: a trained classifier plus patterns, run on the body and every file.
  const found = new Set((await dlp.scan(`${draft.subject}\n${draft.body}`)).classes); // "iban", "health"...
  let rows = 0;
  for (const file of draft.attachments) {
    const scan = await dlp.scanFile(file);
    if (!scan.readable) found.add("unreadable"); // an encrypted zip or a photo counts as data
    for (const c of scan.classes) found.add(c);
    rows += scan.rows; // rows in a CSV or spreadsheet, 0 for other files
  }
  const classes = [...found].sort();

  // One action name per risk, because rules read the name, never the details.
  let action = "email.send.internal";
  if (external.length > 0) {
    action = classes.length > 0 ? "email.send.external.with-data" : "email.send.external";
  }
  if (rows > BULK_ROWS) action = "export.bulk"; // to anyone, inside or out
  return { action, recipients, external, classes, rows, files: draft.attachments.length };
}

Two choices keep the classification honest. A file the scanner cannot read counts as data, so an encrypted archive cannot slip out under the harmless name. And the recipient check is an exact match on your own domains, so a look-alike domain is outside.

For ticket replies the same idea applies with one change: take the recipient from the ticket record, never from the model, and scan the reply for order numbers or addresses that belong to another account. A hit gets its own name, ticket.reply.other-customer.

Show the recipients, not the records

Then the send goes through the gate with that name. The request says who the message goes to and what kind of data was found. It does not carry the data:

import { ApprovalClient } from "@variantgate/agent";
import { NotApprovedError } from "@variantgate/agent/errors";

const approvals = new ApprovalClient({ agent: "support-bot", apiUrl, key: process.env.VG_KEY! });
class DraftChanged extends Error {}
class BadDraft extends Error {}

// The model only writes drafts. This tool sends one, by id, from your own store.
async function sendDraft(draftId: string) {
  const draft = await drafts.load(draftId);
  const risk = await classify(draft);
  const digest = sha256(canonical(draft)); // ties the approval to this exact message

  return approvals.guard(
    {
      action: risk.action,
      // Who it goes to and what kind of data: never the data, never file names.
      summary: `Email ${risk.recipients.length} recipients (${risk.external.length} outside) with ${risk.files} files, ${risk.rows} rows`,
      details: {
        recipients: risk.recipients.join(", "),
        outside_recipients: risk.external.join(", ") || "none",
        data_found: risk.classes.join(", ") || "none",
        review: `https://app.example.com/drafts/${draftId}`, // opens behind your own sign-in
        digest,
      },
    },
    async () => {
      // A person may take minutes. Send only what was approved, or ask again.
      const current = await drafts.load(draftId);
      if (sha256(canonical(current)) !== digest) throw new DraftChanged("not sent");
      try {
        return await mail.send(current); // the message id goes on the record
      } catch (error) {
        const ref = log.error({ draftId, error }); // the raw error stays in your logs
        throw new Error(`send failed and may have gone out, see log ${ref}`);
      }
    }
  );
}

// What the model hears back. Pending, denied and expired all mean not sent.
async function sendTool(draftId: string) {
  try {
    return `Sent, message ${await sendDraft(draftId)}`;
  } catch (error) {
    // Checked first: an edited approval is a NotApprovedError too, so its status can read approved.
    if (error instanceof NotApprovedError) return "Not sent: it was not approved as written";
    if (error instanceof DraftChanged) return "Not sent: the draft changed after approval";
    if (error instanceof BadDraft) return `Not sent: ${error.message}`;
    // A fixed answer, not a thrown error the framework hands back for another try.
    log.error({ draftId, error }, "send outcome unknown");
    return "The send failed and may have gone out. A person will check it. Do not send it again.";
  }
}
  • The request is a disclosure channel too. Its summary goes into the emails and chat messages about it, signed webhooks and the record’s CSV export, and its details are stored with it and shown to everyone who may decide. Put customer rows there and the gate has made a copy of the leak. The approver who needs to read the message opens your own review page, behind your own access checks.
  • What was approved is what is sent. The digest ties the approval to one version of the draft. If the draft changed while a person was deciding, nothing goes out.
  • A failed send may still have gone out. The raw error can hold addresses or content, and guard records the error’s message as the outcome note, so the raw error stays in your logs and the record gets a reference. The model gets a fixed answer that says not to send it again.
  • Only a yes sends. Pending, denied and expired all leave the draft unsent.

Rules per risk

With the risk in the name, rules can answer the routine cases for a person. Rules read the action name, the agent key and the amount, never the details, which is why the classification has to happen in your code:

# Mail that stays inside the company goes out on its own.
{ "action": "email.send.internal", "effect": "allow" }

# Outside mail with no data found: only the scheduling agent's key goes alone.
# For every other key no rule matches, so a person decides.
{ "action": "email.send.external", "effect": "allow", "agent_key_id": "SCHEDULER_KEY_ID" }

# Outside mail carrying data, and ticket replies naming another customer.
{ "action": "email.send.external.with-data", "effect": "ask" }
{ "action": "ticket.reply.other-customer", "effect": "ask" }

# More than 50 rows, to anyone: two different people (Team and above).
{ "action": "export.bulk", "effect": "ask", "approvals": 2 }

# No agent makes a public share link.
{ "action": "share.public-link", "effect": "deny" }

The most cautious rule wins, so an owner who later writes a broad allow for email.* still cannot let data go outside without a person. Two-person approval needs the Team plan or above. If the run has also read untrusted text, such as an email from a stranger, send with a second key whose rules always ask: that is the Rule of Two from LLM01:2026 Prompt Injection, and exfiltration is the harm it exists to stop. The approval policy generator writes rules like these, and the tool risk checker shows which tools in an MCP list can send data out at all.

What an approval service does not cover

Most of this entry happens where no action asks for permission. Keep these with the controls that own them:

  • Leaks inside the answer. A model that repeats another tenant’s chunk, or summarises the text under a black PDF redaction box (Scenario #9), has already disclosed it. Scoped retrieval and output classification are the fix.
  • Training and embeddings. Memorisation, membership inference and embedding inversion need corpus hygiene, protected vector stores and the Tier 2 and 3 measures.
  • Side channels. Token length, latency and cache behaviour are handled in the serving stack, with padding and partitioned caches.
  • Exits that never ask. In Scenario #10 an injected “diagnostic check” makes a code runtime encode spreadsheet content into DNS queries. A sandbox with network access can leak without calling any tool, so it needs no outbound network, not an approval.
  • What the classifier misses. A person shown “no data found” cannot spot base64 either, and cannot see a conclusion assembled from sources that were each allowed, which OWASP counts as disclosure when policy forbids it.

A gate lowers the cost of the leaks that are actions. It does not make retrieval, logging or the model safe, and it should never be the reason an agent is given data it does not need.

The rest of the 2026 list, with where an approval helps and where it does not, is in our overview of the OWASP Top 10 for LLM Applications 2026.

Sources

  1. OWASP GenAI Security Project: OWASP GenAI LLM Top 10 2026, LLM02:2026 Sensitive Information Disclosure
  2. OWASP: Top 10 for LLM Applications 2025

Give your agents somewhere to ask.

Free for 100 requests a month. Sign in with your email and have a first request waiting a few minutes from now.

Start free