← Blog

OverThink Slowdown Attacks Turn Context Into a Reasoning Bill

Parminder Singh
Parminder Singh··4 min read
Summarize with AI

An OverThink attack places decoy reasoning problems inside external context so a reasoning model spends extra compute before returning an otherwise plausible answer. The practical controls are context provenance, input budgets, route limits, timeouts, and per-request cost evidence.

Problem-Awareai-securityllm-securityprompt-injectionpolicy-enforcementarchitecture
OverThink Slowdown Attacks Turn Context Into a Reasoning Bill

A reasoning model can spend expensive hidden tokens on a problem. The user never asked it to solve that problem. The OverThink paper, first submitted on February 4, 2025 and revised in September 2026, describes decoy reasoning tasks planted in external context. The model still returns a contextually plausible answer, while the injected puzzle stretches latency and compute.

TL;DR

  • OverThink hides decoy reasoning work inside content consumed by reasoning models and coding agents.
  • Defend with context provenance and input limits, backed by route-specific budgets, deadlines, and cost anomaly detection.
  • Enforce the HTTP model request before inference; handle poisoned files and repositories at their ingestion points too.

The payload looks like useful context

The attack targets applications that read external material, including support articles and repository files. Retrieved passages or images can carry the same kind of payload, and a decoy can resemble ordinary technical content. That makes keyword blocking a weak control. The paper studies language and decision tasks alongside visual tasks crafted to consume more reasoning while preserving the visible answer.

The answer may be correct while traditional output-quality monitoring stays green, which creates an awkward incident because cost records and response time carry the evidence instead.

Picture a coding agent opening a README with one extra paragraph tucked below the installation notes. The user sees a normal repository. The model sees another problem to reason through, then spends time on it even though the extra work contributes nothing to the requested code change. This mechanism sits inside the wider indirect prompt-injection defense problem.

Cost policy needs request context

A useful request policy combines four limits. Cap input size by route and data source. Then set a maximum reasoning effort for the task class, use a wall-clock deadline to constrain duration, and track cumulative spend for the authenticated caller and source repository.

Apply these controls to each request. A route serving short classification calls should not inherit the same ceiling as a route performing a planned code review over several files. The policy record should show which ceiling applied and why. An operator can then distinguish an approved expensive task from an injected workload.

OWASP classifies uncontrolled inference as LLM10:2025 Unbounded Consumption. That category includes denial of service, service degradation, and economic loss. OverThink is a specific content mechanism inside that broader availability problem.

My opinion is that a monthly provider budget is an accounting control dressed as security. The useful decision happens earlier, before one request consumes an absurd share of a route's allowance.

Provenance narrows the review surface

Store where every context block came from. Give user text and repository files distinct labels, and do the same for web retrieval, internal knowledge, and tool output before prompt assembly. A request containing newly fetched public content deserves a different budget and inspection path than a request built only from approved internal records.

Do not flatten the prompt into one anonymous string before policy evaluation. Preserve source boundaries and byte counts, along with content hashes and trust labels, so an investigator can connect a latency spike to the exact file or retrieved chunk that introduced the decoy.

Provenance makes repeated exposure visible too. If several slow requests contain the same retrieved chunk, the shared hash gives the incident responder a concrete object to quarantine. Without that boundary, the team must compare large assembled prompts by hand. New requests continue to consume capacity during that work.

The same record supports AI runtime security controls, especially when the response itself appears harmless.

Detection uses cost and latency together

Because single-request latency varies, a fixed threshold will create noise. Compare requests within the same route and model, then narrow the comparison by task class and input-size band. Alert when reasoning duration or billed tokens diverge from that local baseline.

The baseline needs enough context to avoid punishing legitimate long tasks. Input size alone is insufficient. Two prompts with similar byte counts can trigger very different amounts of reasoning, while route purpose and recent behavior provide the comparison needed to spot a sudden increase without treating every large request as hostile.

A circuit breaker should stop repeated calls from the same context hash or source after a threshold breach. Quarantine the source for review. Preserve the full request record, and require a fresh authorization before replay. Retrying the same poisoned context against a larger model compounds the event.

DeepInspect

DeepInspect can apply identity-aware policy to the HTTP request sent to a reasoning model. Before inference begins, the decision can use the caller and route, the selected model and prompt classification, plus content size and application-supplied provenance.

Repository compromise and file ingestion remain separate controls from local agent execution. The enforceable DeepInspect slice is narrower: the authenticated model request and response deliberately routed through the proxy.

Book a demo today.

Frequently asked questions

Is OverThink a jailbreak?

The published attack focuses on forcing extra reasoning rather than obtaining prohibited content. Both attacks can arrive through injected context. The measured harm here is resource consumption and delay, so keep availability controls beside content-safety controls.

Can a gateway remove the decoy automatically?

A gateway can classify a routed prompt and block it. It can also apply size rules, enforce budget rules, or deny a suspicious source class. Reliable surgical removal is harder because the decoy may resemble relevant prose. Quarantine plus bounded replay is safer than silently rewriting production context.