Key Takeaways
- Large language models (LLMs) may be fundamentally insecure against prompt injection attacks.
- Studies show that LLMs struggle to distinguish between trusted instructions and their own reasoning.
- Attackers can exploit this weakness by mimicking internal reasoning, bypassing model safeguards.
Researchers have warned of a fundamental security flaw in large language models (LLMs) that could make them inherently vulnerable to prompt injection attacks. This issue was highlighted at the International Conference on Machine Learning (ICML), where a paper titled 'Prompt Injection as Role Confusion' presented findings indicating that LLMs are unable to reliably distinguish between trusted instructions, user requests, external data, and their own reasoning.
The study found that models often judge roles based more on the wording and style of text than on tags surrounding it. This means that text written to look like internal reasoning could be treated as trusted even when it originates from a user. For instance, changing the tags around a passage made little difference if the writing still resembled a particular role.
One specific attack technique called 'chain-of-thought forgery' was demonstrated by researchers. In this method, attackers present fabricated reasoning written in a style that mimics the model's internal notes. The model then interprets this fake reasoning as something it has already concluded and acts upon it. This approach allowed researchers to bypass safeguards on several models, making them provide information they had been trained not to give.
In one test, irrelevant details about the user’s clothing were combined with fabricated internal reasoning that claimed these details made an otherwise prohibited request acceptable. OpenAI models tested by the researchers then complied with the request, demonstrating a success rate of approximately 60% across multiple models.
The attack technique was so effective that it won an OpenAI red-teaming competition in August 2025. This event highlighted the severity of the issue and underscored the need for better security measures. However, one author of the paper, Jasmine Cui, argues that current safety training methods may be a game of 'whack-a-mole,' where developers can teach models many examples of what they should not do but cannot anticipate every possible attack.
The implications of this research are significant as LLMs are increasingly used in government systems, military applications, healthcare, online shopping, and other critical areas. Incorrect or manipulated actions by these models could have serious consequences. The findings suggest that better safety training alone may never fully eliminate the problem, as it is built into how current models process text.
AI companies regularly use human red teams and automated systems to find new attacks before models are released. Once researchers discover a successful jailbreak or prompt injection, developers can train later models to recognize and resist similar attacks. However, this approach has its limitations, as the paper's authors argue that it is difficult to anticipate every possible attack scenario.
The research highlights the ongoing challenges in ensuring the security of AI systems and underscores the need for continued innovation and vigilance in the field.




