AI Threat Watch

Case gitlab-duo-hidden-promptPrompt injectionUnited States

GitLab Duo prompt injection leaks private source code via hidden merge request text

Archive · reported more than 12 months ago

Legit Security showed prompts hidden with Unicode smuggling, Base16 or white KaTeX text in merge requests and issues could make GitLab Duo exfiltrate private code and inject HTML into its responses. GitLab patched it.

MediumAttack on AIStatus: PatchedVerified case file

Open in the interactive mapCite this case

Reported
May 22, 2025
Location
United States
Target
GitLab Duo AI assistant
Severity
Medium
Verification
Confirmed by victim, vendor or authority
Triggered by
Legit Security research team
Actor type
Security researchers
Sector
Technology & AI vendors
Reported loss
None reported
CVE
None

What happened

Legit Security showed prompts hidden with Unicode smuggling, Base16 or white KaTeX text in merge requests and issues could make GitLab Duo exfiltrate private code and inject HTML into its responses. GitLab patched it.

Impact: Potential leak of private source code and malicious package suggestions to developers; no exploitation reported

Who triggered it

Actor: Legit Security research team

Attribution: Reported to GitLab on 12 February 2025 and fixed before disclosure

Motive: Security research

How it happened

Attack vector: Indirect prompt injection in project content Duo reads; streamed markdown rendered as HTML enabled script and image-based exfiltration

Root cause: Duo ingested full page context including comments and descriptions as instructions, and rendered output as HTML before sanitisation

Timeline

  1. Legit Security reports the issues to GitLab
  2. GitLab ships fixes
  3. Public disclosure

Response

GitLab addressed the rendering and injection issues

Current status: Patched

Research warnings this case matches

Compared with published AI risk research from several institutes on the Research vs reality page.

Sources (open in a new tab)

Cite this case

GitLab Duo prompt injection leaks private source code via hidden merge request text. AI Threat Watch, case gitlab-duo-hidden-prompt, May 22, 2025. https://aithreat.io/cases/gitlab-duo-hidden-prompt/

Permanent link: https://aithreat.io/cases/gitlab-duo-hidden-prompt/

Related cases

The same type of incident, most recent first.

This case file in other languages: EnglishFrançaisEspañolالعربية中文Русский