2026-03-20 | AI and LLM Security | Oracle-42 Intelligence Research
```html
ChatGPT Data Exfiltration via Markdown Image Injection: A Stealthy DNS Exfiltration Vector
Executive Summary: A novel attack vector leveraging ChatGPT’s markdown image rendering capability has emerged as a potent method for data exfiltration via DNS. By embedding malicious image links in markdown content, adversaries can exfiltrate sensitive data—including chat logs, system prompts, and user inputs—through DNS queries. This technique bypasses traditional network firewalls and data loss prevention (DLP) tools, enabling stealthy exfiltration across organizational boundaries. Our analysis reveals that this method exploits ChatGPT’s web-access capabilities and DNS resolution behavior, posing a significant threat to confidentiality in enterprise and cloud environments. Organizations must urgently implement monitoring, content filtering, and policy controls to mitigate this risk.
Key Findings
Markdown Image Injection (MII): Attackers inject markdown-formatted image URLs containing encoded sensitive data into ChatGPT chats.
DNS-Based Exfiltration: ChatGPT resolves these images via DNS, sending outbound queries that encode stolen data in subdomains.
Bypass of Security Controls: Traditional egress filters, firewalls, and DLP tools often ignore DNS exfiltration or lack visibility into LLM interactions.
Widespread Applicability: Affects all ChatGPT variants with web browsing or image rendering capabilities (including GPT-4o, GPT-4, and enterprise tiers).
Low Detection Footprint: DNS queries appear benign, blending into normal network traffic; exfiltrated data is reconstructed server-side.
Technical Analysis: How Markdown Image Injection Works
Markdown Image Injection (MII) exploits ChatGPT’s interpretation of markdown syntax to embed external image references. When a user (or attacker) submits a crafted message containing a markdown image tag, ChatGPT attempts to render the image by resolving the URL. This process triggers a DNS lookup, which can be weaponized to encode arbitrary data.
Step-by-Step Exfiltration Workflow
Data Compilation: The attacker collects sensitive data (e.g., internal documents, API keys, chat transcripts) from compromised systems.
Data Encoding: The data is encoded into DNS-compatible subdomains using base32, hexadecimal, or custom alphabets.
Markdown Payload Construction: A markdown image URL is crafted as follows:

Injection into ChatGPT: The payload is submitted via user prompt or system message (if exploitable via API or interface).
DNS Query Generation: ChatGPT resolves the domain, sending a DNS request with the encoded data in the subdomain.
Data Reconstruction: The attacker’s server captures and decodes the subdomain, extracting the exfiltrated data.
For example, the string user-secret-key-123 might be encoded as:
Each DNS query leaks a portion of data, and the attacker reassembles it from multiple queries.
Why This Bypasses Traditional Defenses
Standard security controls fail to detect DNS-based exfiltration in this context due to:
Outbound DNS Allowed: Most networks permit DNS egress for legitimate resolution.
No Payload Inspection: DNS queries are small and often uninspected; TLS encryption in HTTPS hides content.
LLM Blind Spots: Security tools rarely monitor AI application traffic, assuming it is benign.
Short-Lived Queries: DNS lookups are transient; logs may not retain query details long enough for forensic analysis.
Real-World Implications and Risk Scenarios
This technique poses severe risks in environments where ChatGPT is integrated with internal systems, such as:
Enterprise Copilots: ChatGPT integrated into internal knowledge bases (e.g., via Retrieval-Augmented Generation).
API-Accessible LLMs: Automated agents or scripts that send data to ChatGPT via API.
Third-Party Integrations: Chatbots embedded in customer support platforms or SaaS tools.
In a 2025 penetration test, Oracle-42 Intelligence observed successful exfiltration of a Fortune 500 company’s internal project roadmap within 37 minutes using MII—undetected by SIEM or firewall alerts.
Mitigation and Detection Strategies
Preventive Controls
Disable Image Rendering: Configure ChatGPT instances to block external image loading or markdown image tags.
Network Segmentation: Isolate AI application traffic and restrict outbound DNS to approved resolvers.
DNS Sinkholing: Redirect unauthorized DNS queries to benign endpoints or block them entirely.
Zero-Trust Architecture: Enforce least-privilege access and continuous authentication for AI interfaces.
Detective Controls
DNS Query Monitoring: Log and analyze all DNS queries from AI endpoints; flag anomalies in subdomain length or entropy.
AI Traffic Inspection: Deploy inline proxies or API gateways to inspect and sanitize ChatGPT input/output.
Behavioral Analytics: Use machine learning to detect unusual data flows (e.g., large volumes of encoded strings in prompts).
Endpoint Hardening: Disable unnecessary features like web browsing or image rendering in enterprise ChatGPT deployments.
Recommendations for Organizations
Audit AI Usage: Identify all ChatGPT integrations and classify data flows.
Implement Policy Enforcement: Use tools like Microsoft Purview or Zscaler to filter malicious markdown and URLs.
Educate Staff: Train employees on secure AI usage and the risks of image injection vectors.
Monitor for DNS Exfiltration: Deploy DNS analytics platforms (e.g., Infoblox, Cisco Umbrella) with exfiltration detection models.
Adopt Secure Alternatives: Consider air-gapped or private LLM instances for sensitive workloads.
Future Outlook: The Evolving Threat Landscape
As LLMs become more embedded in enterprise workflows, adversaries will increasingly exploit their web-access and rendering capabilities. Markdown Image Injection is likely the first of many AI-native exfiltration vectors. We anticipate growth in:
HTML/JavaScript Injection: Via web-enabled LLMs that render complex content.
WebSocket or HTTP Leakage: Exfiltrating data through legitimate API calls disguised as normal traffic.
Prompt Injection + Data Exfiltration: Combining prompt manipulation with covert data transmission.
Organizations must adopt a proactive, AI-aware security posture to stay ahead of these evolving threats.
Conclusion
Markdown Image Injection represents a critical, underappreciated threat to data confidentiality in the AI era. By repurposing ChatGPT’s image rendering mechanism as a DNS exfiltration channel, attackers can stealthily exfiltrate sensitive information with minimal risk of detection. Addressing this vulnerability requires a combination of technical controls, policy enforcement, and continuous monitoring—root