Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentCoding assistants

GitLab AI Gateway: a crafted Duo agent flow could run commands on self-hosted gateways

CriticalGitLab

GitLab disclosed CVE-2026-90970 on October 2, 2026: an authenticated user with access to the Duo Agent Platform could escape the prompt template sandbox of the AI Gateway with a specially crafted flow configuration and run arbitrary commands on the gateway. The flaw is a template engine weakness (CWE-1336). Only self-hosted AI Gateways need action; GitLab.com, GitLab Dedicated and instances using GitLab's hosted gateway were already patched. It was reported through HackerOne and no exploitation has been reported.

Replay the attack step by step in the Learning Center

How it happened

  1. Custom flows in the Duo Agent Platform are rendered through a prompt template engine on the AI Gateway.
  2. A specially crafted flow configuration escaped the template sandbox.
  3. The escape gave arbitrary command execution on the gateway, with low privileges needed and no user interaction.

Impact

Anyone with Duo Agent Platform access could take over a self-hosted AI Gateway, the component that talks to models on behalf of the whole GitLab instance.

The fix

Upgrade the self-hosted AI Gateway to 19.2.4, 19.3.2 or 19.4.1. Hosted gateways were patched by GitLab.

Lessons

  • Agent flow definitions are code: whoever can edit them can reach the template engine and, with a flaw like this one, the host.
  • Self-hosted AI components need the same patch cadence as the main product; this is the second CVSS 9.9 template flaw in the same gateway this year.

Sources