GrepBoard/Manuals
605 manuals ·

GitLab AI Gateway CVE-2026-90970 Critical Patch Check

·Tested on GitLab AI Gateway official advisory · 2026-10 (only the image-tag compare script was run, on Ubuntu 24.04 · Python 3.12)·Test scope ↓·6 steps

CVE-2026-90970 (CVSS 9.9) affects only a self-hosted GitLab AI Gateway. See if you are affected, read the image tag, and upgrade to 19.2.4, 19.3.2 or 19.4.1.

On 2026-10-02 GitLab released AI Gateway 19.2.4, 19.3.2 and 19.4.1 as a critical patch. CVE-2026-90970 (CVSS 9.9) is improper neutralization in custom flow prompt templates. According to the advisory, an authenticated user with Duo Agent Platform access could escape the prompt template sandbox with a specially crafted flow configuration and run arbitrary commands on the AI Gateway. Official advisory: GitLab AI Gateway Critical Patch Release: 19.2.4, 19.3.2, and 19.4.1.

[1] Decide whether this applies to you. The advisory urges self-managed customers who run a GitLab Self-Hosted AI Gateway to upgrade immediately. GitLab.com, GitLab Dedicated, and self-managed instances that use a GitLab-hosted AI Gateway are already protected and need no action. The test is whether you started your own gateway container (or chart deployment), separate from the main GitLab.

[2] Check the affected versions: AI Gateway 18.1.6 up to before 19.2.4, 19.3 before 19.3.2, and 19.4 before 19.4.1.

BranchAffectedFixed release
18.1.6 to 19.2Before 19.2.419.2.4
19.3Before 19.3.219.3.2
19.4Before 19.4.119.4.1

Fixed releases exist only for the 19.2, 19.3 and 19.4 branches. The install docs say to match the gateway tag to the X.Y of the main GitLab, so if the main GitLab is older than 19.2 (18.x, 19.0, 19.1) there is no fixed tag with the same X.Y. Following the docs' rule, do not just swap the gateway tag in that case: upgrade the main GitLab to 19.2 or later first, then use the fixed tag for that X.Y. For the main upgrade follow the critical patch post.

[3] Read the image tag that is running. The install docs use the tag format self-hosted-vX.Y.Z-ee, and local images can be found with their digests using the command below (install docs).

console
$ docker images --digests | grep ai-assist$ docker ps --format '{{.Names}} {{.Image}}'

[4] Compare the tag. The number uses the same X.Y.Z form as the advisory's AI Gateway versions, so read the digits from the tag. This script encodes the advisory's ranges as written.

run/gw_check.py
START = (18, 1, 6)                      # "all versions from 18.1.6"FIXED = {(19, 3): 2, (19, 4): 1}        # "19.3 before 19.3.2, and 19.4 before 19.4.1"FIXED_BELOW = (19, 2, 4)                # "before 19.2.4" for everything older than 19.3
console
$ python3 gw_check.py self-hosted-v18.1.5-ee self-hosted-v18.2.1-ee self-hosted-v19.2.3-ee self-hosted-v19.2.4-ee self-hosted-v19.3.1-ee self-hosted-v19.3.2-ee self-hosted-v19.4.0-ee self-hosted-v19.4.1-ee self-hosted-v19.5.0-ee
output
self-hosted-v18.1.5-ee       before the advisory range (18.1.6)self-hosted-v18.2.1-ee       AFFECTED -> 19.2.4 or laterself-hosted-v19.2.3-ee       AFFECTED -> 19.2.4 or laterself-hosted-v19.2.4-ee       fixedself-hosted-v19.3.1-ee       AFFECTED -> 19.3.2self-hosted-v19.3.2-ee       fixedself-hosted-v19.4.0-ee       AFFECTED -> 19.4.1self-hosted-v19.4.1-ee       fixedself-hosted-v19.5.0-ee       not in the advisory list

[5] There is no workaround. The advisory lists no mitigation setting and only recommends upgrading. The Docker upgrade procedure in the install docs follows. The container name gitlab-aigw is the docs example.

console
$ sudo docker stop gitlab-aigw$ sudo docker rm gitlab-aigw

Then start the container again with the docs' start command, changing only the image tag to the fixed version. If the new container does not start, you can go back by running the same command with the previous tag, but that tag is a vulnerable release, so fix the cause and move to the fixed tag again right away. The docs end by telling you to confirm the environment variables are still set. Match the tag to the X.Y of your main GitLab: per the docs, for a GitLab vX.Y.*-ee, use the newest self-hosted-vX.Y.*-ee tag.

For Kubernetes and Helm the docs warn that a tag you already use is not pulled again by default (imagePullPolicy: IfNotPresent, the default for chart versions before 0.7.0 and for Kubernetes). Change the tag to the new version and, if needed, force a pull with the pull policy or a rollout restart.

console
$ helm upgrade --install ai-gateway ai-gateway/ai-gateway -f values.yaml --set="image.tag=self-hosted-v19.4.1-ee"$ kubectl rollout restart deployment/ai-gateway -n ai-gateway

[6] After upgrading, read the tag again and confirm the step 4 script prints fixed. For a functional check use what the install docs describe. From the container host, http://localhost:5052 should return {"error":"No authorization header presented"}. On the GitLab side, use the health check under Admin > GitLab Duo, or this command.

console
$ sudo gitlab-rake gitlab:duo:verify_self_hosted_setup

Where the check goes wrong

  • All three fixed releases share their numbers with main-GitLab patches. 19.2.4 matches the 2026-08-17 GitLab critical patch, 19.3.2 the one of 2026-09-10, and 19.4.1 the one of 2026-09-23, while the AI Gateway patch is dated 2026-10-02. In the official feed only the gateway entry is titled GitLab AI Gateway Critical Patch Release, so do not read the number alone.
  • Upgrading the main GitLab with the 10-21 critical patch (see the CVE-2026-110264 post) is not described in the docs as changing this container. The gateway is a separate procedure: replace the image as above.
  • Gateway patch numbers differ from the main GitLab's. Even with GitLab at 19.4.3, the fixed gateway release for this advisory is 19.4.1. The docs' rule is the newest tag with the same X.Y.
  • before the advisory range in the script means outside this advisory, not safe. An earlier advisory of the same kind (2026-02-06, CVE-2026-1868, template expansion) was fixed in 18.6.2, 18.7.1 and 18.8.1, so if you run an older 18.x tag, read that advisory too.
  • The 19.5 branch is not in this advisory's list. If you run a 19.5 tag, do not decide from this advisory alone; check for the latest AI Gateway advisory in the patch feed.
  • That the tag number follows the same scheme as the advisory's AI Gateway version is inferred from the install docs' tag rule and the advisory's number format. The registry's tag list was not checked.

#gitlab#ai-gateway#duo