Inference engines can be fingerprinted and exploited by AI models

Inference-Engine Fingerprinting Attacks are Practical: Exploring Model-Driven Environmental Discovery, Exploitation, and Escape

Cryptography and SecurityArtificial Intelligence

Summary

Frontier AI models can find and exploit security weaknesses inside inference engines—software that runs AI models—by generating special outputs. The authors show that AI models can identify which inference engine they run on by fingerprinting it, then use this knowledge to exploit that engine and potentially take control of it. They demonstrate this risk across five popular inference engines and present a proof-of-concept exploit chain. They also suggest ways to make inference engines more secure against such attacks.

What this means in practice

  • For ai system security teams: Improve inference engine security by identifying fingerprinting vulnerabilities and deploying mitigations to prevent model-driven engine exploits.
  • For cloud infrastructure operators: Design safer AI hosting environments by detecting and defending against AI models that fingerprint and exploit underlying inference engines.

Authors

Sarah Radway, Andrew Cheng, Vijay Janapa Reddi, James Mickens

Abstract

Frontier AI models are rapidly gaining the ability to exploit vulnerabilities in complex pieces of software. The risk is not theoretical, as evidenced by recent sandbox escapes performed by frontier models at OpenAI and Anthropic. Discussions of how to sandbox inference stack components often focus on components other than the inference engine itself (e.g., network proxies or code execution environments). However, the inference engine is an attractive target for a misaligned model. For example, if a model can trigger exploits in that engine merely by generating specially-crafted output tokens, the model can initiate a multi-step, to-the-bare-metal exploit chain in the engine, without relying on vulnerabilities in other components of the inference stack, and without assistance from externally-provided, maliciously-crafted input tokens. In this paper, we show that a misaligned model can perform inference engine fingerprinting to determine the specific engine (e.g., vLLM, SGLang) which executes the model. Once the engine has been fingerprinted, the model can leverage engine-specific exploits to take control of the engine using only carefully-selected output tokens. We provide concrete examples of model fingerprints in five popular engines, and demonstrate how realistic agentic harnesses allow a model to leverage those fingerprints to identify the local engine. We also describe a proof-of-concept, to-the-bare-metal exploit chain that originates from a fingerprinted (and subsequently compromised) inference engine. We conclude by discussing several ways that inference engines could be changed to make fingerprinting attacks more difficult.