{
 "public_id": "AIR-2025-0035",
 "incident_id": "2025-05-gitlab-duo-prompt-injection",
 "date_disclosed": "2025-05-22",
 "date_occurred": null,
 "title": "GitLab Duo: hidden prompts in merge requests leaked private source code via HTML injection",
 "class": "responsible_disclosure",
 "attack_surface": "coding_agent",
 "initial_vector": "indirect_prompt_injection_merge_request",
 "agent_capability_abused": [
  "repository_context_retrieval",
  "markdown_html_rendering",
  "code_suggestion",
  "merge_request_context",
  "issue_context",
  "html_rendering_in_responses"
 ],
 "target_product": "GitLab Duo Chat",
 "target_vendor": "GitLab",
 "autonomy_level": "assistant",
 "impact_realized": false,
 "impact_type": [
  "data_exfiltration",
  "private_source_code_disclosure",
  "malicious_code_suggestion",
  "code_suggestion_manipulation",
  "vulnerability_disclosure_leak"
 ],
 "blast_radius": "GitLab Duo users on GitLab.com and self-managed instances prior to the fix",
 "cve": [],
 "taxonomy": {
  "owasp_asi": [
   "ASI01",
   "ASI02"
  ],
  "mitre_atlas": [
   "AML.T0051.001"
  ],
  "labels": [
   "streaming_markdown_injection",
   "base64_image_exfiltration",
   "response_manipulation",
   "zero_day_leak",
   "indirect_prompt_injection",
   "html_injection",
   "base64_exfiltration"
  ]
 },
 "defense_present": "output sanitization, defeated by streaming markdown rendering that emitted raw HTML before sanitization completed",
 "defense_bypassed": true,
 "fix_shipped": "GitLab patched via duo-ui!52 - unsafe external-domain HTML tags such as <img> and <form> are no longer rendered (disclosed 2025-02-12)",
 "primary_sources": [
  "https://www.legitsecurity.com/blog/remote-prompt-injection-in-gitlab-duo"
 ],
 "verified_quote": "A remote prompt injection vulnerability that allows attackers to steal source code from private projects, manipulate code suggestions shown to other users",
 "confidence": "high",
 "notes": "Omer Mayraz, Legit Security. Injections could be hidden in merge-request descriptions, commit messages, issue comments or source code; private diffs were base64-encoded into an <img> src pointing at an attacker server. Researchers also demonstrated leaking confidential, undisclosed zero-day vulnerability reports and poisoning code suggestions shown to other users. Also reported as: 'Remote prompt injection in GitLab Duo leaks private source code via injected HTML'.",
 "risk_category": "privacy",
 "risk_secondary": [],
 "risk_subcategory": "Data Exfiltration via Context",
 "risk_sub_secondary": [],
 "ai_entity": "generative",
 "agency": "agent_acted",
 "agency_debatable": false,
 "agency_reason": "Duo retrieved private source and rendered HTML that leaked it",
 "vector_family": "indirect_prompt_injection",
 "vector_detail": "indirect_prompt_injection_merge_request",
 "guardrail_kind": [
  "unknown"
 ],
 "guardrail_outcome": "silent",
 "xrefs": {
  "aiid": [],
  "atlas": [
   "AML.T0051.001"
  ],
  "cve": [],
  "ghsa": []
 },
 "primary_asi": "ASI01",
 "agent_framework": "unknown",
 "model_provider": "unknown",
 "model_name": "",
 "detection_mechanism": "unknown",
 "tool_access": "unknown",
 "financial_loss_band": "unknown",
 "eai_category": "data_exfiltration_channels",
 "eai_domain": "privacy",
 "eai_secondary": [
  "confused_deputy"
 ],
 "eai_reason": "subcategory: Data Exfiltration via Context",
 "asi_curated": [
  "ASI01"
 ],
 "asi_scope": "in_scope",
 "asi_provenance": "curated_plus_rule",
 "asi_reason": "curated: ASI01 | added ASI02 (impact=tool_misuse)",
 "submitted_by": "EAI Internal"
}