Ask a team whether GitLab is patched and someone will quote you a version number. In October 2026 that answer stopped being sufficient, because the month's first critical GitLab advisory was not about GitLab. It was about the AI Gateway: a separate service, with its own release lines, its own image tags, and its own patch state, sitting beside the application that most patch inventories stop at.
The advisory is CVE-2026-90970, published by GitLab on October 2, 2026 and rated CVSS 9.9. In GitLab's own words, an authenticated user with Duo Agent Platform access could escape the prompt template sandbox via a specially crafted flow configuration, leading to arbitrary command execution on the AI Gateway. GitLab had already deployed the fix to the gateways it hosts. Everyone running their own gateway, the deployment GitLab sells as Duo Self-Hosted, had to find theirs, read its version, and upgrade it themselves. GitLab contacted those customers directly before publishing, which tells you how it rated the risk of people not knowing the component existed.
This post walks the flaw slowly: what the AI Gateway actually is, where the template stopped being a template, a precise test for whether you were exposed, the patch and why the first fixed version is a floor rather than a target, and an audit you can run against your own deployment. It stays defensive on purpose. As of October 31, 2026, GitLab has published no exploit detail for this CVE, and none is reconstructed here.
The component nobody inventories
The AI Gateway is the broker for GitLab's AI features. Requests from Duo, code suggestions, chat, and Duo Agent Platform flows, pass through it on their way to the model providers, and the responses pass back through it on the way out. Two properties follow from that position. The gateway sees the traffic: prompts, code context, and completions. And on self-hosted setups it holds the means to send that traffic: the credentials and configuration for the models it connects to, including self-hosted models inside your own network.
GitLab offers the gateway in more than one shape, and the shape is what decides your exposure. GitLab runs a hosted gateway for GitLab.com and GitLab Dedicated, and self-managed instances can also point at that hosted gateway. Alternatively, an organization can run the gateway itself, as a container image or a Helm deployment, which is the Duo Self-Hosted model built for teams that want the AI path inside their own perimeter. GitLab's documentation describes hosted, self-hosted, and hybrid configurations. Only the self-hosted shape carries this vulnerability, because only there is the vulnerable code running on infrastructure you patch.
Hold two consequences of that split carefully. First, "we run self-managed GitLab" does not settle the question in either direction. A self-managed instance pointed at GitLab's hosted gateway needed no action. A self-managed instance with a self-hosted gateway was exposed even if the GitLab application itself was fully patched, because upgrading GitLab does not upgrade the gateway. The two ship and version separately, and GitLab's own patch posts remind administrators that components such as the AI Gateway and GitLab Runner are updated separately from the application. Second, the gateway's version is the only version that matters here, and it is not the version on your GitLab admin page.
What actually broke
Duo Agent Platform flows are configurations. A flow describes an AI-assisted task: which model to call, which tools to offer, and which prompt templates to fill in along the way. Prompt templates are the text scaffolding the gateway wraps around user and project data before anything reaches a model. Because flow authors are users, not gateway developers, the templates are rendered inside a sandbox: the environment that is supposed to guarantee a template can assemble text and do nothing else.
CVE-2026-90970 is the failure of that guarantee. The CVE record classifies it as CWE-1336, improper neutralization of special elements used in a template engine. That is the formal name for the family most developers know as server-side template injection: input that should be treated as data is interpreted as template syntax, and template syntax, in an engine with access to the host language, becomes code. GitLab's description says a specially crafted flow configuration escaped the prompt template sandbox. Read at the level GitLab published, the chain is short. An authenticated user supplies a flow configuration. The gateway renders its prompt templates. The crafted configuration is not adequately neutralized, the rendering crosses the sandbox boundary, and the result is arbitrary command execution on the gateway itself.
That is as deep as the public record goes, and this post will not pretend otherwise. As of October 31, 2026, GitLab has not published the vulnerable code path, the specific template constructs involved, or a proof of concept, and its security process keeps the underlying issue private well past the patch date. Any article that shows you the exact malformed template is inventing it or laundering it. The mechanism that matters for defenders is the boundary, not the payload: a user-controlled configuration reached a template engine, and the sandbox was the only control between data and the gateway's own runtime.
One more fact sharpens that point. This is the second CVSS 9.9 template flaw in this component in 2026. On February 6, GitLab shipped AI Gateway 18.6.2, 18.7.1, and 18.8.1 as a critical patch release for CVE-2026-1868: insecure template expansion of user-supplied data via crafted Duo Agent Platform Flow definitions in the Duo Workflow Service, rated with the same 9.9 vector and the same CWE-1336 classification, with denial of service or code execution on the gateway as the outcome. Two criticals, eight months apart, same component, same weakness class, same attack surface. Template handling in the gateway is not a boundary that failed once. It is a boundary under recurring pressure, and it should be inventoried and patched like one.
Now read the score properly, because 9.9 for a bug that requires a login confuses people. The vector is AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Network reachable, low complexity, no user interaction. The privileges required are low: an account with Duo Agent Platform access, not an administrator, not a maintainer, not anyone with infrastructure rights. The scope is changed, and that letter deserves a careful reading. Scope changed means the impact crosses a security authority: the flaw lives in a sandboxed template renderer, and the impact lands on the gateway service that the renderer was supposed to be walled off from. It does not mean the commands reach the machine underneath. The advisory supports arbitrary command execution on the AI Gateway, inside its runtime or container. It does not establish a container escape, or any path from the gateway to the host operating system, and no public source claims one. From the gateway's own position, the impact ratings are high across confidentiality, integrity, and availability, which matches what the gateway can see and hold. Whoever runs commands there inherits its view of your prompts and completions, its model credentials, and its ability to alter the responses your developers read. Authentication is a speed bump on this bug, not a wall, because the population with Duo Agent Platform access on a typical instance is measured in tens or hundreds of people, plus every account that could be compromised or created inside that population.
Are you exposed? Two deployment checks, one attacker-access check
Exposure is narrower than the headline, and the narrowing is checkable. Two conditions describe your deployment, and together they settle whether you were exposed. A third describes the attacker, and settles whether the exposure could be used:
- Deployment check: shape. You run a self-hosted AI Gateway, the Duo Self-Hosted container or Helm deployment. If your GitLab instance, self-managed or not, uses GitLab's hosted gateway, and GitLab.com and GitLab Dedicated always do, this condition fails and the CVE does not reach you. GitLab deployed the fix to its hosted gateways before publishing the advisory.
- Deployment check: version. The gateway is in one of the affected ranges: every release from 18.1.6 up to but not including 19.2.4; or 19.3 before 19.3.2; or 19.4 before 19.4.1. Read the first range carefully. It swallows the entire 18.x line and the 19.0 to 19.2 lines, because there is no fixed 18.x release for this CVE. A gateway diligently patched for the February flaw, sitting on 18.8.1, is inside the October range and needed to move to 19.2.4.
- Attacker-access check. Accounts with Duo Agent Platform access able to submit custom flow configurations exist on the connected instance. This is not a third exposure condition. It is the exploitation prerequisite, the PR:L in the vector, and the wider and less reviewed that population is, the more the low-privileges rating means in practice.
If the first check fails, you can stop reading defensively and keep this post as inventory hygiene. If the first two hold, you were exposed for exactly as long as the gateway ran an affected build, whether or not anyone aimed a flow at it. The third check decides how usable that exposure was, not whether it existed.
Two honest limits on what is known. First, exploitation: as of October 31, 2026, GitLab's advisory reports none, no public proof of concept has been published, and CVE-2026-90970 is not in CISA's Known Exploited Vulnerabilities catalog. Keep that in proportion with the month's other GitLab news. The CE/EE regex flaw fixed on October 12, CVE-2026-97229, was added to that catalog on October 29 with exploitation confirmed, which shows the difference between a flaw attackers have picked up and one they have not, yet. Second, detection: the AI Gateway advisory ships no detection guidance, unlike the October CE/EE releases, for which GitLab published threat detections. There is no vendor query to run against your gateway logs for this one. Absence of suspicious flows in a review is weak evidence, and the audit below is written with that weakness in mind.
The patch, and why first fixed is the floor
The vulnerability was first fixed on October 2, 2026, in AI Gateway 19.2.4, 19.3.2, and 19.4.1, one release per supported branch:
| Gateway branch | Affected versions | First fixed |
|---|---|---|
| 18.1.6 through 19.2 | 18.1.6 up to before 19.2.4 | 19.2.4 |
| 19.3 | 19.3 before 19.3.2 | 19.3.2 |
| 19.4 | 19.4 before 19.4.1 | 19.4.1 |
Those numbers are the floor: the earliest safe build on each fixed branch, not the destination. GitLab kept shipping after October 2, so on the branches where this CVE was fixed, patch to the current build, not the first one that closed it:
| Gateway line | Safe for CVE-2026-90970 |
|---|---|
| 19.2 | 19.2.5 or later (first fixed 19.2.4) |
| 19.3 | 19.3.3 or later (first fixed 19.3.2) |
| 19.4 | 19.4.3 or later (first fixed 19.4.1) |
| 19.5 | 19.5.3 or later |
Now the trap, because October also produced a table that looks like a target and is not. GitLab's patch release post of October 29, 2026 lists the latest AI Gateway version for every release line, including the old ones, in a table separate from the GitLab CE and EE versions in the same post:
| Gateway branch | Latest listed AI Gateway patch per release line (Oct 29, 2026). NOT a CVE-2026-90970 remediation matrix |
|---|---|
| 18.11 | 18.11.8 |
| 19.0 | 19.0.13 |
| 19.1 | 19.1.9 |
| 19.2 | 19.2.5 |
| 19.3 | 19.3.3 |
| 19.4 | 19.4.3 |
| 19.5 | 19.5.3 |
Read that table for what GitLab says it is: those releases are certificate security updates (CVE-2026-111943), the latest patch on each line. Nothing in them states that the October RCE was backported to 18.11, 19.0, or 19.1, and the October 2 advisory's affected range runs from 18.1.6 up to before 19.2.4, with the remedy on the 19.2 line and later. On the fixed lines the two tables agree, because the newest patch is also past the fix. On the old lines they diverge, and a gateway upgraded only to its own line's October 29 build would still be running code the advisory calls affected. Patching to the latest version on your line is normally the right instinct. For this CVE, on those lines, it is not enough.
So if your gateway sits on 18.x, 19.0, or 19.1, there is no in-line patch that closes CVE-2026-90970 on any published evidence. GitLab's installation documentation expects the gateway on the X.Y line matching the GitLab instance, which rules out quietly moving the gateway alone to 19.2.5. The supported route is a coordinated upgrade: instance and gateway together, to a compatible vendor-supported line that carries the fix, 19.2.5 or later for the gateway. The only alternative is explicit confirmation from GitLab that a backport exists for your line. Ask for it in writing; do not presume it from a version number.
One more distinction the October 29 post makes concrete: the gateway numbers are not the application numbers from the same release. On October 29 the application stood at 19.4.5 and 19.3.7 (table below) while the gateway stood at 19.4.3 and 19.3.3. The application and the gateway are verified independently, against their own version lists, or one of them is not verified at all. And check GitLab's release posts again before you schedule the change, because your branch will have moved by the time you read this.
Patch the application too, separately, because its October was worse than the gateway's. Self-managed CE and EE went through three security patch rounds in the month: October 12 (19.4.2, 19.3.5, 19.2.8), October 21 (19.5.1, 19.4.3, 19.3.6, with backports to 19.2.9, 19.1.9, 19.0.10, and 18.11.13), and the late-October scheduled release. The current install targets for the application, per GitLab's release tracking as of October 29, are:
| GitLab branch | Install today |
|---|---|
| 19.5 | 19.5.3 |
| 19.4 | 19.4.5 |
| 19.3 | 19.3.7 |
| 19.2 | 19.2.10 |
The reason to go past the first fix is concrete, not hygienic. An instance that patched promptly on October 12 closed CVE-2026-97229 and remained exposed to CVE-2026-110264, a second unauthenticated code execution flaw rated 10.0 that affects every version from 7.0 onward and was only fixed on October 21. An instance that stopped at the October 12 builds is, today, behind on a flaw whose sibling is already confirmed exploited. First fixed is a historical minimum. Current is the policy.
Audit your gateway
With the patch understood, spend the next hour making the gateway a known quantity. Five steps.
1. Find the gateway and read its real version. Read the version off the running deployment, not off the file you believe describes it. Treat every command below as a starting point that narrows the search. None of them is complete version verification on its own, and each of the obvious ones has a known way to mislead:
# First pass: find gateway containers by image name.
# A mirrored registry, a renamed image, or a custom tag defeats this match.
docker ps --format '{{.Image}}' | grep -i ai-gateway
# Follow-up: the image reference and image ID the running container actually uses
docker inspect --format '{{.Config.Image}} {{.Image}}' CONTAINER_ID
# Helm: the release list shows that a release exists, not what its pods run
helm list --all-namespaces | grep -i ai-gateway
# What the pods actually run: image references across every namespace
kubectl get deploy,pods -A -o wide
# The same inventory, with the resolved image ID (digest) per pod
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{" "}{.spec.containers[*].image}{" "}{.status.containerStatuses[*].imageID}{"\n"}{end}'
Validate what comes back against records that cannot drift quietly: the deployed image digest, the version label on the image where the image carries one, and your own release inventory of what was deployed and when.
# Labels on the deployed image, where the image carries a version label
docker image inspect --format '{{json .Config.Labels}}' IMAGE_OR_CONTAINER
One warning matters more than any single command: a mutable tag such as latest is not evidence of a version, least of all after an upgrade. A tag names whatever it pointed at when each pod started, two pods on the same tag can run different builds, and a tag can be repointed without anything in the deployment changing. The digest is the identity of what runs. Record the digest.
Then compare what is running against the manifest, compose file, or Helm values you deploy from. Drift between the two is exactly how a patched plan stays vulnerable, and it is the most common finding in this kind of audit. While you are there, confirm the deployment shape from the GitLab side: your instance's Duo Self-Hosted configuration records which gateway it talks to. If that gateway is GitLab's hosted one, your audit for this CVE ends here, with the shape written down.
2. Compare per branch. Match the running version against the affected table above, branch first, number second. Remember the 18.x trap: below the 19.2 line there is no in-line fix for this CVE at all, so the safe destination is the CVE-specific table above (19.2.5 or later on the 19.2 line), reached by upgrading instance and gateway together. Neither a February patch level nor the latest certificate patch on an old line clears an October advisory.
3. Inventory the attacker population and the flows. List who holds Duo Agent Platform access, and list the custom flows that exist, who authored them, and what changed in them while the gateway ran an affected version. A crafted flow configuration is the delivery vehicle for this flaw, which makes the flows themselves audit evidence. A flow nobody recognizes, or one edited inside the exposure window by an account that should not have been editing flows, deserves a careful read before it runs again on the patched gateway.
4. Look at the gateway runtime. GitLab published no detections for this CVE, so this step is general review aimed at the gateway's specific value: processes running inside the gateway's container or service that the gateway does not explain, outbound connections from the gateway to destinations that are not your model providers, and unexpected restarts. If the gateway holds model provider credentials, check those providers for usage that does not match your traffic. Anything you cannot explain moves this from patching to incident response, and credential rotation for the keys the gateway held becomes part of remediation rather than an afterthought.
5. Patch, then verify the running thing. Upgrade the gateway deployment to a version in the safe-for-CVE-2026-90970 table above, for old lines via the coordinated instance and gateway upgrade described there, or to a newer fixed build if GitLab has shipped one since. Then redeploy, and repeat step 1 against the running deployment, digest included. Record the gateway, its version, and its owner in the same patch inventory that tracks GitLab and Runner, so the next critical gateway release is a lookup rather than an archaeological dig.
If you cannot patch today
GitLab lists no workaround for CVE-2026-90970, and the advisory documents no configuration change that closes the template path. Patching is the fix, and it is worth saying plainly that nothing below substitutes for it.
The one lever that changes the math while you schedule the upgrade is the size of the authenticated population. Restricting Duo Agent Platform access, and custom flow authorship in particular, to the smallest group that needs it shrinks the set of accounts that could deliver a crafted configuration. That is risk reduction, not remediation: the privileges bar for this flaw is already low, and every remaining account is a potential path. Treat it as buying hours for the upgrade, and spend the hours on the upgrade.
The general lesson
Strip the AI framing off this CVE and a familiar shape remains. CWE-1336 is server-side template injection, a category with a long history, and it reappeared inside the newest layer of the stack because AI features still assemble prompts by rendering templates over user-influenced input. The sandbox was the security boundary, and template sandboxes fail in a particular direction: silently, toward code execution, on a service that was trusted because it looked like plumbing.
The operational lesson is the one October kept teaching. Modern platforms are fleets of separately versioned services, and the satellite components, gateways, runners, registries, do not inherit the flagship product's patch state. "We patched GitLab" turned out to be several different statements in October 2026, about an application, a gateway, and a runner, each needing its own version check and its own evidence. Inventory the fleet, version every hull, and the next 9.9 in a component nobody owned becomes a lookup instead of a discovery.
Sources
Check every claim in this post against the primary documents:
- NVD record for CVE-2026-90970 · nvd.nist.gov
- GitLab AI Gateway Critical Patch Release: 19.2.4, 19.3.2, and 19.4.1 · docs.gitlab.com
- GitLab Patch Release: 19.5.3 · docs.gitlab.com
- Installing the AI Gateway · docs.gitlab.com
- GitLab AI Gateway Critical Patch Release: 18.6.2, 18.7.1, and 18.8.1 · docs.gitlab.com
- CVE-2026-90970 vulnerability entry · rapid7.com
- GitLab warns of critical RCE vulnerability in AI Gateway service · bleepingcomputer.com
- GitLab release tracking, current patch level per branch · endoflife.date
- Inside the GitLab Flaw: From CI Configuration to Server Execution (CVE-2026-97229) · cyber.mag212.com




