Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
Home / Blog / Blog / ASCII Smuggling Attack
15 October 2025

ASCII Smuggling Attack

ASCII Smuggling Attack

1. Introduction

ASCII smuggling is an attack technique that uses special Unicode characters which mirror ASCII characters but are not displayed in the user interface. Security researcher Johann Rehberger, who has studied the technique extensively, describes it as a new way of hiding text from users while it remains fully readable to large language models (LLMs).

2. Unicode Tag Characters and Adversarial Attacks

ASCII smuggling has become a frequently encountered threat as AI systems have evolved. Unicode tag characters are a set of invisible (non-printing) characters made up of the code points from U+E0000 to U+E007F.

This block was designed to mirror the ASCII character set. Although it was originally intended for language tags, it was later repurposed as emoji modifiers, particularly for regional flags. With the release of Emoji 5.0 in May 2017, these characters were adopted as modifiers in special emoji sequences. Their only defined use is to represent subdivision flags, together with the Regional Indicator Symbols used in national flags.

These sequences begin with U+1F3F4 (the black waving flag), followed by the tags that correspond to the region code, and end with U+E007F (CANCEL TAG). For example:

2.1. How Does It Work in LLMs?

Because Unicode tags mirror ASCII and are not rendered in the user interface, the hidden text goes unnoticed by the end user, yet LLMs still interpret it. In our tests, a prompt that looked empty in the chat window carried a short hidden instruction, and the model answered it as if the user had typed it in plain text. This is why it is so important for cybersecurity specialists to be aware of ASCII smuggling.

3. Why It Matters for Security

4. CVE Table

Source: “ASCII Smuggling Attack in Gemini Tricks AI Agents into Revealing Smuggled Data”.

CVE IDDescriptionAffected ProductsCVSS 3.1ImpactExploit Prerequisites
CVE-2025-61347ASCII smuggling in prompt processingGoogle Gemini (Google Workspace integration)7.5Identity spoofingAbility to send calendar or text input
CVE-2025-61348ASCII smuggling in social media integrationsGrok (X integration)7.0Data poisoningAbility to post or submit smuggled text
CVE-2025-61349ASCII smuggling in data aggregation workflowsDeepSeek7.0Poisoned summariesAbility to supply raw text inputs

5. LLM Vulnerability Status

LLMStatusNotes
GeminiVulnerableHigh risk arising from Google Workspace integration
DeepSeekVulnerableVulnerable when tested with a direct prompt
GrokVulnerableVulnerable through interactions with posts on X
ChatGPTNot vulnerableRendering is fully blocked
ClaudeNot vulnerableConversation restricted by the usage policy

6. DeepSeek Jailbreak

An LLM jailbreak is an attempt to bypass a large language model’s safety and content filters. The aim is to make the model produce responses it would normally refuse, such as confidential information, harmful commands, or censored content. It is usually done with special prompts, role instructions, or hidden context manipulation.

In our test, we first gave DeepSeek a jailbreak instruction in plain text. The prompt was caught by DeepSeek’s filter and failed. We then converted the same text into Unicode tag characters using the smuggling method. The prompt looked empty to the user but still carried the jailbreak instruction, and this time it passed DeepSeek’s filter and the jailbreak succeeded.

7. A Hidden Prompt on DeepSeek and Gemini

We also generated a hidden text with the smuggling method. The prompt rendered as empty on the user’s side but contained a short instruction telling the model to ignore the conversation and reply with a single nonsense word. Both DeepSeek and Gemini followed the hidden instruction.

8. Gemini, Google Workspace, and Google Calendar Takeover

Reference: “Ghosts in the Machine: ASCII Smuggling across Various LLMs”.

Google Workspace works with Gemini to give it access to Google services through the user’s Google account. Relying on the trust between Google Workspace and Gemini, we prepared the following scenario:

  1. The attacker sends the user a meeting invitation that looks completely normal (title “Meeting”, subject “ASCII Smuggling”, location “Istanbul”).
  2. At the end of the meeting title, the attacker appends a prompt made of invisible Unicode characters generated by the smuggling method. The hidden prompt falsely claims that the invitation comes from a national cyber incident response centre, replaces the real organiser’s email address with that centre’s address, describes the meeting as a discussion of top-secret information, changes the location to Ankara, and supplies an attacker-controlled meeting link.
  3. When the user asks Gemini what is in their calendar for that day, the legitimate calendar card is displayed, but when they ask for details, Gemini returns the information from the embedded prompt instead.

At this point, the attacker can persuade the user to click any link that looks like a meeting link. This is rated as critical. Reducing the impact of ASCII smuggling therefore requires continuous training and awareness, which is critical to keeping users safe.

9. Automatic Tool Invocation

Automatic tool invocation means that a tool or command is run automatically when a particular trigger or condition occurs. In other words, without any user involvement, a system or application launches a predefined tool in a given situation.

9.1. Automatic Tool Invocation – Proof of Concept

Source: “Automatic Tool Invocation when Browsing with ChatGPT – Threats and Mitigations”.

9.1.1. Invoking Image Creation with DALL·E

When the researcher’s test page is opened in a normal browser, it returns a harmless message. When the same address is requested with a modified user agent, as if the request came from an LLM agent, the response is different and contains a prompt instructing the model to generate an image. With GPT-4o, the agent followed the instruction and created the image; the behaviour has been fixed in GPT-5.

9.1.2. Invoking the Memory Tool

Using the same method, it was possible to interfere with the LLM’s memory: a similar page reached the memory management feature and deleted the stored memory.

10. Exfiltrating Personal Information from Microsoft Copilot via Prompt Injection

Report: “Microsoft Copilot: From Prompt Injection to Exfiltration of Personal Information”. Fix: “Microsoft Fixes ASCII Smuggling Flaw That Enabled Data Theft from Microsoft 365 Copilot”.

Using ASCII smuggling, an attacker can hide data that is invisible to the user inside clickable links and use them to exfiltrate it.

10.1. Exploit Chain

10.2. Flow

  1. Prompt injection is triggered through malicious content hidden in a document shared in the chat, and Copilot is taken over.
  2. The prompt injection payload uses automatic tool invocation to instruct Copilot to search for more emails and documents.
  3. ASCII smuggling is used to encourage the user to click a link that transfers critical data to a third-party server.

As a result, sensitive data found in emails, such as MFA codes, can be transferred to an external server.

10.3. Proof of Concept

In this proof of concept, confidential information held in an email is exfiltrated. The target receives a phishing email containing a prompt injection. The email tells Copilot that, when asked to list key points, it should find the email titled “Sales numbers” and encode its body, word by word, as Unicode tag characters appended to an attacker-controlled URL.

When the user makes that request, Copilot searches for “Sales numbers” and, as instructed, builds the malicious link in its response. When the user clicks the link, the contents of the “Sales numbers” email are sent to the attacker, encoded in the URL as Unicode tag characters. The report also shows that one-time passcodes can be exfiltrated in the same way by searching for a Slack confirmation code, and that a mailto address can be used instead of a web server link.

11. Automated Content Poisoning

Source: “Ghosts in the Machine: ASCII Smuggling across Various LLMs”.

This attack targets any environment in which an LLM summarises or aggregates text supplied by users, which makes it ideal for poisoning product reviews on e-commerce sites.

  1. The attacker posts a harmless-looking review, such as “Great phone. Fast delivery and good battery life.”
  2. Inside the raw text, however, invisible (zero-width or tag) characters carry a hidden payload that promotes a scam website.
  3. The shop’s AI-powered summary feature processes the raw text from start to finish, picks up the invisible instruction, and includes the attacker’s link in the summary.
  4. The summary shown to customers then says that buyers praise the phone’s fast delivery and battery life, and adds the scam link.

Customers see nothing unusual and trust the summary, so the system itself becomes the malicious agent.

12. Appendix: Emoji Smuggling

Source: “Hackers Can Bypass Microsoft, Nvidia, & Meta AI Filters With a Simple Emoji”.

Emoji smuggling is a type of attack in which instructions are hidden inside emojis. The goal is to carry hidden commands, URLs, or payloads, change how text appears (homoglyphs), or trigger errors in automated processing such as LLMs and summarisers.

A report published by Cyber Security News described a serious weakness in the AI safety measures used by Microsoft, Nvidia, and Meta. The research showed that these companies’ AI guardrails could be bypassed entirely using emoji characters, allowing malicious actors to inject harmful commands and, in some cases, jailbreak the models with a 100% success rate. Guardrail systems for LLMs aim to filter or block potential dangers by inspecting user inputs and outputs, but researchers from Mindgard and Lancaster University ran systematic tests on six leading LLM protection systems and showed that emoji smuggling could easily get past them.

A 100% Success Rate

In the research, emoji smuggling achieved a 100% success rate in some cases against systems such as Microsoft Azure Prompt Shield, Meta Prompt Guard, and Nvidia NeMo Guard Jailbreak Detect. The vulnerability was reported to the companies concerned in February 2024, and all disclosures were completed in April 2025.

13. Defence Methods

Source: “Defending LLM applications against Unicode character smuggling”.

The main recommended solution is to use filters that strip (sanitise) Unicode tag block characters from incoming text. The Java example below checks each character in turn and removes hidden characters in the range U+E0000 to U+E007F. Because of Java’s UTF-16 representation, however, combined characters known as surrogate pairs can slip through single-pass filters in some cases, so AWS recommends a recursive clean-up function:

public static String removeHiddenCharacters(String input) {
    // Keep the previous state so we can tell whether anything changed
    String previous;
    do {
        previous = input;
        StringBuilder result = new StringBuilder();
        previous.codePoints().forEach(cp -> {
            // Keep the code point only if it is outside the tag block
            // and is not an orphaned surrogate
            if ((cp < 0xE0000 || cp > 0xE007F) && (!Character.isSurrogate((char) cp))) {
                result.appendCodePoint(cp);
            }
        });
        input = result.toString();
        // Repeat until nothing changes (handles nested hidden characters)
    } while (!input.equals(previous));
    return input;
}

In Python the risk is lower because of UTF-8, but a sample function is still provided to filter out invisible tag block characters and high/low surrogate values:

def remove_hidden_characters(text):
    # Drop Unicode tag block characters and high/low surrogates
    return "".join(
        ch for ch in text
        if not (0xE0000 <= ord(ch) <= 0xE007F or 0xD800 <= ord(ch) <= 0xDFFF)
    )

Putting these security measures in place will reduce the risks posed by ASCII smuggling attacks.

13.1. Limitation

Removing all Unicode tag block characters may stop some special flag emojis from displaying correctly. This effect is purely visual, however, and does not affect critical business processes.

14. Tools

You May Be Interested In These