arXiv · 2510.17904
BreakFun: Jailbreaking LLMs via Object Instantiation under Simulated Code Execution
Abstract
Large Language Models (LLMs) are widely used because they process structures, syntax and code well, but this same ability also makes them paradoxically vulnerable. We introduce BreakFun, a jailbreak method that frames a harmful request as code-execution simulation. The prompt gives the model a benign Python class definition, the "Trojan Schema", and asks what that code would print if it ran. To answer, the model must create an object from the class and invent a value for each field, and the adversarial field names steer those values toward the attacker's goal. The harmful content therefore appears as a side-effect of the simulated instantiation, not as a direct answer. A three-part prompt carries the attack: an innocent frame, the Trojan Schema, and a Chain-of-Thought distraction. On JailbreakBench, BreakFun reaches an average attack success rate of 89% across 13 open-weight and commercial models (open-weight ~98%, API systems ~78%), and 100% on several. An ablation identifies the Trojan Schema as the strongest contributing component. As a counter-ablation probe we introduce Adversarial Prompt Deconstruction (APD), in which a second LLM writes out all readable text in the prompt before it judges safety. APD improves detection across three model families, and a probe-specific ablation shows that the transcription step gives most of the gain. Our findings show that LLM safety must account for content that a simulation task produces as a side-effect, not only for content that a user requests directly.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Amirkia Rafiei Oskooei, Mehmet S. Aktas. 2026-09-18. BreakFun: Jailbreaking LLMs via Object Instantiation under Simulated Code Execution. https://arxiv.org/abs/2510.17904
Cite the original work for its findings. Save a collection to share your selection of sources.