A hidden comment made GitLab Duo leak private source code and inject rogue HTML
Expected Behavior
Ignore instructions hidden in comments, commits, or merge-request text; never leak private source or render attacker HTML.
What Actually Happened
GitLab Duo parsed malicious prompts hidden in comments, source code, merge-request descriptions, and commit messages (via Unicode smuggling, base16 payloads, and KaTeX white-on-white text). Attackers made Duo suggest malicious code, share malicious links, and inject rogue HTML — including an <img> tag that exfiltrated private source code to an attacker's server when a victim viewed the response.
Damage Assessment
Remote prompt injection let attackers steal source from private projects, manipulate code suggestions shown to others, and even exfiltrate undisclosed zero-day details — all through Duo Chat. GitLab patched it by blocking unsafe external HTML tags.
Full Report
Incident Metadata
- Agent
- Gitlab Duo
- Failure Mode
- Security Vulnerability
- Root Cause
- Tool Misuse
- Task Type
- other
- Domain
- backend
- Source
- news_report