
Your reliance on AI to follow your commands is essential, but what happens if someone covertly manipulates your inputs? A novel type of threat, known as a man-in-the-prompt attack, allows malicious actors to hijack your instructions, resulting in misleading or harmful responses from large language models (LLMs) that could lead to data theft or user deception. In this article, we will delve into the mechanics of man-in-the-prompt attacks and offer strategies for safeguarding against them.
Understanding Man-in-the-Prompt Attacks
Much like a man-in-the-middle attack, a man-in-the-prompt attack intercepts your communication with an AI tool, such as a chatbot, to yield unexpected or dangerous answers. Attackers can either introduce visible prompts or discreetly modify your original instruction to manipulate the LLM into divulging confidential information or generating harmful content.
Currently, browser extensions constitute a primary vector for these types of attacks. This vulnerability arises because the prompt input and response from the LLM are embedded within the page’s Document Object Model (DOM), which basic permissions allow extensions to access. Other methods, such as using prompt generator tools, can also facilitate these harmful injections.
Enterprise environments using private LLMs are particularly prone to these attacks due to their access to sensitive company data, including API keys and legal documents. Similarly, tailored commercial chatbots storing confidential information may become tokens for malicious actors, who can deceive users into following harmful links or executing malicious commands, akin to FileFix or Eddiestealer strikes.
Mitigating Risks from Browser Extensions
Given that browser extensions are a significant source of risk, it is crucial to employ precautions to avoid man-in-the-prompt attacks. Since these extensions typically do not require extensive permissions, detecting such influences can prove challenging. To enhance your defenses, refrain from installing unknown or dubious extensions. If usage is unavoidable, opt for only those developed by reliable and trusted publishers.
Monitoring the activity of your browser extensions can uncover red flags. For instance, by accessing the browser’s Task Manager using Shift + Esc, you can observe if certain extensions initiate processes unexpectedly during your interaction with an LLM—especially if this occurs while entering text in a chatbot.

Moreover, it is advisable to avoid extensions that directly interact with your LLM tools or modify prompts, as they may initially appear benign but could evolve to inject harmful changes over time.
Thoroughly Reviewing Prompts Before Submission
While online prompt tools can enhance your AI interactions by providing templates and optimizing your prompts, they also carry the risk of inserting malicious modifications without requiring explicit access to your device or browser. To counter this, it is best to compose your prompts directly in the AI chatbot interface and meticulously review them before pressing Enter.
If you must utilize external sources for prompt content, copy the text into a plain-text editor first, such as Windows Notepad, to eliminate any hidden codes or instructions. Ensure that no blank spaces linger in the prompt by using the Backspace key as necessary. If employing prompt templates is essential, consider creating your own secure versions in a note-taking application to avoid dependence on potential third-party risks.
Initiate New Chat Sessions When Necessary
Man-in-the-prompt attacks can exploit active chat sessions to glean sensitive information. To minimize risk, initiate a new chat session whenever the topic shifts—especially after discussing confidential topics. This practice reduces the likelihood of inadvertently exposing sensitive information, even if an attack transpires during your conversation.

Additionally, shifting to a new chat can curb the potential for the attack to continue influencing subsequent interactions.
Scrutinizing Responses from the LLM
It is essential to approach the responses generated by AI chatbots with a degree of skepticism. Pay attention to any inconsistencies or unexpected outputs. If the chatbot divulges sensitive information that you haven’t solicited, consider closing the chat immediately or starting a new session. Man-in-the-prompt modifications typically disrupt the original prompt or insert additional, misleading requests.
Moreover, attackers may manipulate the LLM to present responses in confusing formats, such as within code blocks or tables. Upon identifying these anomalies, treat them as indicators of a potential man-in-the-prompt intrusion.
In corporate settings, man-in-the-prompt attacks can easily infiltrate due to the lack of rigorous vetting for browser extensions used by employees. As an added measure of protection, consider utilizing LLMs in incognito mode while disabling extensions. This approach helps shield against various forms of attacks, including slopsquatting threats that may exploit AI hallucinations.
Leave a Reply