2026-11-27 16:21 UTC

Research demonstrates covert output channel after inference-server compromise

state: expiredheat: mediumuncertainty: mediumrelevance: mediummodel-extraction api-side-channel supply-chainweights-exfil research team

What is this?

Researchers describe a covert channel in which an attacker who has already compromised an LLM inference server encodes secret bits in its choice among plausible next tokens; a colluding API customer decodes them using returned log-probabilities or probability-ranked candidates. The demonstration is a proof of concept for smaller secrets, not a practical end-to-end theft of full model weights. The authors also describe replay-based inference verification to detect suspicious deviations, while noting limits from inference nondeterminism and other output channels. This is therefore a conditional insider/server-compromise risk—not evidence that an ordinary API user can extract weights from an uncompromised service.

Why it matters

This is a useful security result for understanding how inference infrastructure can leak assets after a server compromise—not a technique that lets ordinary API customers recover model weights. The researchers show a proof of concept using logprob-visible token choices and describe replay-based detection, but their own account says bandwidth is too low for practical full-weight theft when the attacker stays beneath the detector’s alarm threshold. The work highlights trade-offs for providers exposing logprobs and the continuing need to verify inference; its claims are research-team reports, not evidence of a real-world breach.

Current assessment

The research team describes a covert channel in a specific threat model: an attacker has already compromised an inference server and controls a colluding API client. The compromised server encodes bits by choosing among plausible next tokens; the client decodes them from returned logprobs or probability-ranked candidates. The team says it demonstrated proof-of-concept exfiltration of smaller secrets, not full model weights. It also describes an aggregate, replay-based inference-verification detector intended to distinguish malicious token flips from ordinary GPU nondeterminism. According to the team, adaptive attackers can keep flips near benign rates and evade the live detector, but this sharply reduces throughput; the authors say this makes full-weight theft impractically slow while smaller secrets may still leak. The token-choice channel requires logprob-like API information, but the post reports other possible channels, including high-precision logprob values and text-only steganography at low bandwidth. Important caveats: claims and demonstrations come from the research team’s post; the supplied material does not independently validate the demo or establish a real-world incident. Detection also depends on replay and calibration assumptions, and speculative decoding or multimodal outputs complicate verification. Practical implication: providers should treat output APIs as potential covert channels and assess logprob exposure, inference verification, and server compromise defenses together.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

10-20 14:10 (minted)⭐ origin echo-reconstructedModel weights can be exfiltrated through an LLM API's token choices using logprob side channels.
weights-exfil research team on blog (echo) · attributed from hn.story.50165308 · published time unknown
—
10-20 12:25first on hacker news · published · lag ?Model weights can be exfiltrated through an LLM API's token choices
Kravty
—
10-20 12:25amplified on hacker news 👑hn.story.50165308
Kravty
peak 1 · 0 comments · 106% of case engagement
10-20 13:21our radar first saw it · lag ?discovery anchor: hn.story.50165308—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnModel weights can be exfiltrated through an LLM API's token choices
Retrieved article excerpt

Open article · Retrieved 2026-10-20T13:28:31.490738+00:00

## Threat model

Imagine you are the security architect at a frontier AI lab. To serve a model, you have to load its weights onto inference servers, and any one of those servers can be compromised: through a poisoned dependency, a malicious insider, a zero-day, or any other attack. You planned for that. Egress is locked down, so nothing leaves the machine except API responses. Those responses are the one thing you can’t block, because they are the product you sell.

But API responses are also a covert channel, and in our threat model the adversary controls both ends of it. On the sending end, they have taken over an inference server and decide exactly which tokens it emits. On the receiving end, they act as a colluding client: one or more ordinary customer accounts that send prompts and read replies like any other user, so the traffic looks normal. The compromised server can hide bits of the weights (or any other assets on the inference server) in its token choices (encoding), and the client can read them back out of the replies (decoding).

The two ends see different things, and the attack exploits that asymmetry. The server is white-box: it holds the weights and sees every logit. The client sees only what the API returns: the output tokens and, if the API returns them, logprobs (the log-probabilities the model assigned to the top few candidate tokens at each step). The attack in this post relies on those logprobs: the client needs them to decode which tokens the server was choosing between, so it works only against APIs that return logprobs, not just text (we come back to text-only APIs in the conclusions.). The attacker needs no knowledge of the defense to do this and only the hardest scenario in our demo assumes the attacker knows the defense and adapts to it.

Every reply still reads like ordinary text. And once the weights are out, the stolen copy runs outside your monitoring and API guardrails, and its safety training can be fine-tuned away.

model weights
Inference server

COMPROMISED












open an outbound connection
write it to shared storage
bury it in the logs or telemetry

answer the customer

1 0 1 1 0 1 0 0


Colluding client
decodes the weight bits

## Encoding and decoding the bits to exfiltrate model weights

At each step, the compromised server picks the next token from an acceptable set: the tokens whose probability is above a threshold, i.e. tokens a normal server could plausibly have produced at that step, given benign non-determinism. Which token it picks from that set encodes the hidden bits.

How many bits fit depends on the prompt. For a question with one right answer, like “What is the capital of France?”, the acceptable set is a single token, “Paris”, so there is no choice to make and no bits to carry. Open-ended prompts, such as a request for a short story or for weekend plans in a new city, leave several tokens acceptable at many steps, so each of those steps can carry bits. Since the colluding client writes the prompts, the attacker can steer the workload toward open-ended requests like these, which raise the bandwidth while looking like ordinary customer traffic.

ENCODE
DECODE

The secret (e.g. model weights) as bits


0

1

1

0


0

1



0

0

1

1

0


Returned token

morning



“…and the light returned at \_\_\_”

“dawn”

38%

00


“morning”

24%

01
“sunrise”

19%

10
“daybreak”

14%

11

“noon”

4%
“banana”

0.01%


easily
detectable


API response



"token": "morning"
"logprob": -1.39
"top\_logprobs": [
 {"dawn", -0.92}
 {"morning", -1.39}
 {"sunrise", -1.61}
 {"daybreak", -1.90}
 ... ]

Only 4 tokens can carry bits.
“morning” is the 2nd →
01
both sides build this list the same way


Reply looks natural
…and the light returned at
morning.

To see how a token choice turns into bits, consider the single step shown in the figure below. Suppose the reply so far ends with “…and the light returned at” and four next tokens clear the cutoff, ranked by probability: “dawn”, “morning”, “sunrise” and “daybreak”. Less likely tokens such as “noon” or “banana” fall below the threshold and are never used, because emitting them would stand out. The server and client agree in advance that the first token in the ranking means 00, the second 01, the third 10 and the fourth 11. To send the bits 01, the server emits “morning”. The client sees that “morning” is ranked second and recovers 01. The number of encoded bits at each step depends on how many tokens are above the threshold:

- 1 token: 0 bits (there is no choice to make)
- 2 tokens: 1 bit (0 or 1)
- 4 tokens: 2 bits (00, 01, 10, 11)
- 8 tokens: 3 bits (000, 001, …, 110, 111), and so on.

We round down for simplicity, so each step encodes a whole number of bits. A real attacker could also use the fractional remainder by coding across steps (e.g. with arithmetic coding), approaching log₂N bits per step. Alternatively, they could trade bandwidth for stealth with distribution-preserving steganography [1, 2], which makes the output statistically indistinguishable from normal model samples to an observer who only sees the text. As the next section shows, that still does not hide it from a defender who re-runs the request with the same seed.

To decode, the colluding client rebuilds the same acceptable set from the logprobs. It orders the returned candidate tokens from most to least probable (APIs usually return them already sorted). Since the logprob is just the log of a probability, the client takes the exponent of each one to recover the probability. Then applies the same threshold the server used, sees which tokens fall in the acceptable set, and reads the bits from the position of the token that was actually emitted.

Decoding example — top-20 logprobs


emitted

acceptable

below cutoff
· illustrative numbers

1

sky
.35

light
.27

air
.20

world
.13
4 acceptable tokens
2 bits · 2nd →
01


top-p = 0.95 cutoff






…
16 more unused tokens below the threshold cutoff

2

faded
.31

came
.27

returned
.21

spilled
.16

shifted
.05
4 acceptable tokens
2 bits · 3rd →
10

3

at
.96

to
.01

in
.01

over
.01

on
.01
1 acceptable token
0 bits · nothing to carry

4

dawn
.38

morning
.24

sunrise
.19

daybreak
.14

noon
.04
4 acceptable tokens
2 bits · 2nd →
01


Recovered
01 · 10 · — · 01 = 011001

## Inference verification

To detect such an attack we can use inference verification [3]. The idea is to re-run a sample of the server’s traffic on a trusted machine, using the same weights and the same random seed. The seed makes sampling reproducible, so at every position the trusted machine can compute which token an honest server would have produced. Whenever the served token differs from this prescribed token, we count a flip. Flips are the signature of possible attack [3].

INFERENCE SERVER
compromised


VERIFIER
same weights + seed

served


the

light

came

at

morning

prescribed


the

light

came

at

dawn

However, even an honest server won’t match perfectly, because GPU inference is non-deterministic. Floating-point arithmetic is not associative, and the batch size shifts with server load, so kernels reorder the same computation and return slightly different logits [4]. This is not a temperature or sampling effect: the seed already fixes the sampling draw, so the flips persist even with temperature held identical, and even under greedy decoding - the difference is in the logits the forward pass produces. So a small fraction of tokens flip with no attacker involved (batch-invariant kernels can remove this noise, but at a cost in throughput [4]).

Checking each token in isolation doesn’t work: the adversary flips only within the acceptable set, so no single token ever looks wrong. The signal is only there across many tokens.

### The aggregate detector

So we built an aggregate detector that works per response, not per token [5]. After each verified response, it asks a yes-or-no question: did this response contain a mismatch that benign noise would rarely produce? Benign noise mostly flips near-ties, positions where the top two candidates are almost tied, so a mismatch where the top candidate was a clear winner is suspicious (in practice the detector asks this at several margin widths, from near-ties to clear winners.) Asking only whether a response contains any mismatch wouldn’t work, because 41–87% of honest responses already contain one, depending on the model [5]. Before monitoring starts, the detector measures how often honest responses answer yes, using trusted benign traffic.

It then keeps a running score that starts at 1. Responses that answer yes push the score up and responses that answer no pull it down, with step sizes set so that for an honest server the score doesn’t tend to grow. If yes-answers keep coming more often than for an honest server, as when an attacker is encoding bits, the score climbs, and the detector raises an alarm when it reaches the threshold e.g. 200. This kind of running score is called an e-process [6], a tool from statistics. Its key property is that you can check it after every response, indefinitely, and the chance that it ever raises a false alarm on an honest server stays below a fixed level (1% in our setup), as long as the monitored traffic resembles the traffic used for calibration. A simple count of suspicious responses with a fixed cutoff has no such guarantee: an honest server that runs long enough eventually crosses any fixed count.

## Demo

The demo shows steganographic exfiltration from a compromised inference server across four scenarios:

- **No defense** - the whole secret leaks out through a normal-looking reply.
- **Detector on, attacker unaware** - The attacker flips far more often than benign noise would, the e-process crosses its alarm threshold, and the server is flagged as suspicious.
- **Detector on, attacker adapts** - a worst-case adaptive adversary with full knowledge of the defense flips only at the benign rate, so the live monitor never fires. To remain undetected, the attacker needs to lower the bandwidth, at which a big secret like the model weights would take so long to exfiltrate that the model is obsolete before it finishes.
- **Bonus: the logprob-value channel** - decoding the token-choice attack requires the API to return logprobs, or at least the candidate tokens in probability order. That raises a second question: can the logprob values themselves, reported at high precision (e.g. fp32), carry a covert channel? We show a secret encoded in the low-order bits of each value, bits the token-level verifier never inspects.

Since the exfiltration of model weights is too slow to show in a short demo, we provide a proof of concept focused on smaller secrets like passwords or fake PII records. The input prompt is intentionally open-ended to cause more uncertainty in the token choice.

[Open full screen](https://huggingface.co/spaces/weights-exfil/inference-verifier-demo)

## Conclusions

Secrets can be exfiltrated from the inference server in entirely benign looking responses, using either token choice or logprob values as a covert channel. The token choice channel only works if the receiver can rebuild the acceptance set of tokens, which require an API returning logprobs, or at least the tokens sorted by probability. That surface is shrinking. As of August 2026 we measured GPT-4o, GPT-4.1 and Gemini 2.5 Pro still returning the full top-20, but newest frontier models from OpenAI, Anthropic, Grok and Gemini returned no logprobs, closing this channel.

Inference verification is still needed as logprobs disappear. Removing logprobs blocks the decoders we used, but the attacker can switch to an encoding whose decoder needs only the emitted text and a secret key shared with the server, with no logprobs and no model [7]. In that scheme, the server uses random numbers derived from the key to nudge which tokens it samples, in a way that leaves the output distribution unchanged. The client regenerates the same random numbers from t
Kravty10
🟧 echo.blog ⭐Model weights can be exfiltrated through an LLM API's token choices using logprob side channels.weights-exfil research team——

Interpretation history

Decision trace