What is an AI side-channel attack?

A side-channel attack on AI extracts confidential information about prompts, responses or the model by observing indirect signals rather than direct output, such as response time, packet sizes in network traffic, cache behaviour or power use.

Unlike a model extraction attack, which collects normal responses through many queries, a side-channel attack looks at the by-products of processing, not the content. Even encrypted traffic can leak token lengths when each token is sent in its own packet.

Topic
AI security
Also known as
Timing side channel

How an AI side-channel attack works

  1. The attacker shares the target's network, service or hardware.
  2. Signals such as response times, packet sizes or cache hits are measured.
  3. Statistical methods or a language model turn the signals into meaningful information.
  4. Mitigation: pad packets to equal size, send tokens in batches, limit cache sharing and mask timing differences.

In more detail

Prefix and KV cache timing side channels (TTFT)

In modern LLM inference engines (such as vLLM or SGLang), shared automatic prefix caching reuses computed key-value (KV) states across requests. Because a cache hit dramatically lowers Time-To-First-Token (TTFT), a multi-tenant attacker can probe whether another user recently sent a confidential system prompt or sensitive prefix simply by measuring response latency differences.

Hardware, power and GPU cache side channels and MoE and speculative decoding leaks

Side channels also target edge devices and shared accelerators through power draw, electromagnetic emissions and GPU cache or memory-bus contention. Attacks such as CacheTelepathy and DeepSniffer have shown that observing hardware execution traces can reconstruct deep neural network layer counts, dimensions and hyperparameters and in speculative decoding or sparse Mixture-of-Experts (MoE) models, token acceptance rates or expert routing imbalances create new input-dependent timing channels.

Balancing security and latency with graded isolation

Defending against side channels imposes measurable performance trade-offs: packet padding and token batching increase perceived streaming latency and bandwidth, while disabling cross-tenant KV-cache sharing sacrifices prefill compute savings. Enterprises should therefore apply full isolation and padding selectively to high-sensitivity tenants rather than incurring uniform overhead across low-risk workloads.

Commonly confused terms

TermHow it differs
Model extraction attackA model extraction attack recovers model weights, architecture or decision boundaries by sending deliberate queries and analysing the returned output content or probabilities; a side-channel attack infers sensitive information from indirect physical or operational traces (timing, packet size, cache hits, power) without needing to exploit output content directly.
Membership inference attackMembership inference determines whether a specific record was in the model's training dataset, usually from output confidence or loss values; a side-channel attack targets runtime operational leaks (such as prompt cache timing or streamed token packet lengths) to infer live prompts, responses or architecture.
Prompt injectionPrompt injection manipulates the model's behaviour through malicious text inside inputs or retrieved data, whereas a side-channel attack is predominantly passive observation of execution telemetry or encrypted traffic metadata without altering model instructions.

Why an AI side-channel attack matters for on-premises AI

A paper demonstrating a remote keylogging attack on AI assistants shows many providers' streamed responses leak token lengths; using these sequences from encrypted traffic with a language model's help, 29% of responses could be accurately reconstructed and the topic of 55% inferred. A study auditing prompt caching in language model APIs reports cached prompts process faster, creating a timing side channel; it detected cache sharing across users at seven providers. In-house, multi-tenant model servers deserve the same scrutiny.

ON-PREMISES EXAMPLE

A bank sends its in-house assistant's streamed responses in fixed-size packets, turns off prompt cache sharing across users and runs sensitive workloads on separate model servers.

Common questions

Does encryption stop side-channel attacks?

Not on its own. If each token goes in its own packet, packet sizes can leak token lengths; padding and batching are needed.

Do in-house models face side-channel risk?

Yes. Shared caches and multi-tenant servers can leak information through timing differences; isolate sensitive workloads.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.