GitLab patches a 9.9 RCE in its self-hosted AI Gateway

gitlabcve-2026-90970ai-gatewayduo-agent-platformrcesecurity+1high-risk claims
GitLab Docs page titled 'GitLab AI Gateway Critical Patch Release: 19.2.4, 19.3.2, and 19.4.1', showing the recommended-action paragraph and the critical-severity security-fix table entry for CVE-2026-90970
Source: GitLab Docs — GitLab AI Gateway Critical Patch Release: 19.2.4, 19.3.2, and 19.4.1 (https://docs.gitlab.com/releases/patches/other-patches/patch-release-gitlab-ai-gateway-19-4-1-released/, 2026-10-02) · Screenshot: AI Newsroom via Playwright Chromium, capture date 2026-10-10 · License: GitLab Docs content is CC BY-SA 4.0

On 2026-10-02, GitLab released a critical fix for its AI Gateway and tracked it as CVE-2026-90970, scoring it 9.9 out of 10 (GitLab, 2026-10-02). An authenticated user with Duo Agent Platform access can escape the prompt-template sandbox through a crafted flow configuration and run arbitrary commands on a self-hosted AI Gateway. Fixed versions are 19.2.4, 19.3.2, and 19.4.1; GitLab-hosted AI Gateways were already patched and need no action.

What happened

GitLab published the AI Gateway patch release on 2026-10-02 and rates the issue Critical. The affected component is the GitLab AI Gateway, the service that brokers GitLab Duo requests and constructs prompts and tool calls for the model backend.

The CVE-2026-90970 section of the GitLab advisory, showing the affected-version line 'all versions from 18.1.6 before 19.2.4, 19.3 before 19.3.2, and 19.4 before 19.4.1' and the CVSS 9.9 vector

Source: GitLab advisory (2026-10-02); screenshot by AI Newsroom, 2026-10-10 via Playwright Chromium. License: GitLab Docs content is CC BY-SA 4.0.

Why it matters

The AI Gateway sits directly on the agent tool-call path, so a remote code execution (RCE) here runs with the gateway’s own privileges, inside the boundary meant to keep generated templates from touching the host. It is not a cosmetic or client-side bug.

Two aspects of the CVSS vector carry the severity. PR:L means the attacker must already be authenticated — but only with ordinary Duo Agent Platform access, not administrative rights. S:C (scope changed) records that the impact moves beyond the vulnerable component. GitLab’s guidance singles out self-managed installations that run their own gateway, not installations routing Duo through GitLab-hosted infrastructure.

How the flaw works

This is a server-side template injection (SSTI). Custom flow prompt templates process user-influenced input, and the template engine fails to neutralize special syntax that it then interprets as directives (CWE-1336).

GitLab describes the result as follows:

“an authenticated user with Duo Agent Platform access to escape the prompt template sandbox via a specially crafted flow configuration, leading to arbitrary command execution on the AI Gateway”

That is the extent of the public technical detail. GitLab published no payload or exploit chain, and this article does not add any. The advisory credits a single external reporter and does not describe an in-the-wild chain.

Who is affected and how to fix

DeploymentStatusAction
Self-hosted AI Gateway 18.1.6 → before 19.2.4AffectedUpgrade to 19.2.4
Self-hosted AI Gateway 19.3 → before 19.3.2AffectedUpgrade to 19.3.2
Self-hosted AI Gateway 19.4 → before 19.4.1AffectedUpgrade to 19.4.1
GitLab.com, GitLab Dedicated, self-managed using a GitLab-hosted AI GatewayNot affectedNo action required

Concrete steps:

  1. Identify your gateway. Confirm whether your Duo deployment runs a self-hosted AI Gateway (/administration/gitlab_duo_self_hosted/) or a GitLab-hosted one. Only the self-hosted case is exposed.
  2. Upgrade to a fixed version. Follow the self-hosted AI Gateway install documentation at docs.gitlab.com/install/install_ai_gateway/ to move to 19.2.4, 19.3.2, or 19.4.1.
  3. Check your major line. The three fixed releases sit on the 19.2, 19.3, and 19.4 lines; 18.x installs are inside the affected range and should move to a 19.x fixed release.

GitLab says it contacted Self-Hosted AI Gateway customers directly before publishing the advisory.

Risks and caveats

What to watch

Sources

#SourceURLDateType
1GitLab Docs — AI Gateway Critical Patch Release 19.2.4 / 19.3.2 / 19.4.1docs.gitlab.com/…/patch-release-gitlab-ai-gateway-19-4-1-released/2026-10-02Primary (CNA)
2CVE-2026-90970 recordcve.org/CVERecord?id=CVE-2026-909702026-10-02Primary (CNA)
3NVD — CVE-2026-90970 detailnvd.nist.gov/vuln/detail/CVE-2026-909702026-10-02Primary
4GitHub Advisory GHSA-5295-vp56-jghqgithub.com/advisories/GHSA-5295-vp56-jghq2026-10-02Primary
5CVE-2026-1868 record — same-class AI Gateway template injectioncve.org/CVERecord?id=CVE-2026-18682026-02-09Primary
6CISA — Known Exploited Vulnerabilities catalogcisa.gov/known-exploited-vulnerabilities-catalogchecked 2026-10-10Primary
7BleepingComputer — GitLab warns of critical RCE vulnerability in AI Gateway servicebleepingcomputer.com/…/gitlab-warns-of-critical-rce-vulnerability-in-ai-gateway-service2026-10-02Secondary