Skip to content

CVE Watch · Ilia Dubovskii · 3 December 2026

TeamCity agent registration auth bypass (CVE-2026-136858): How to Check and Fix

CVE-2026-136858 is an authentication bypass in the build agent registration of every JetBrains TeamCity On-Premises version before 2026.1.7, 2026.2.3 and 2026.3, fixed on 2 December 2026. Anyone who can reach the TeamCity server over HTTP or HTTPS, with no user account, can impersonate an existing authorized build agent, receive the builds meant for it, read the secrets passed to those builds, and publish tampered artifacts. JetBrains scores it CVSS 3.1 9.1 and ships fixed versions plus a security patch plugin for 2021.2 and later. JetBrains is not aware of active exploitation, and TeamCity Cloud is not affected.

The short version

Do nowUpgrade the server to the fixed build for your branch, or install the security patch plugin today, then search teamcity-server.log for the indicator below.

1. What CVE-2026-136858 is

A TeamCity build agent connects to the server at its serverUrl over HTTP(S) and polls for commands. A new agent is "connected, unauthorized, and enabled" and runs no builds until an administrator authorizes it on the Agents page. On first connection the server generates an authorizationToken, saves it into the agent's buildAgent.properties, and uses it "to identify this agent on the TeamCity server for agent authorization purposes" (agent installation, agent configuration).

CVE-2026-136858 breaks that step. JetBrains describes an authentication bypass during agent registration that "allowed takeover of authorized build agents", classed as CWE-639, authorization bypass through a user-controlled key (CVE record). In plain words, a request to the agent endpoints can make the server accept the sender as an agent that is already authorized, without that agent's token. JetBrains does not publish the root cause or the request, and this page does not guess.

The attacker gains the agent's position. A successful exploit "could displace a legitimate build agent and intercept builds assigned to it", which "can expose credentials and other secrets passed to the agent". The attacker can also falsify results or publish tampered artifacts, and "downstream builds that consume those artifacts could execute attacker-supplied code" (JetBrains advisory). Security researcher Jiawei Guo reported the bug privately on 24 November 2026; JetBrains published fixes and the advisory on 2 December 2026.

2. Impact: who is exposed and how badly

The attack needs network access to the server's HTTP(S) port and nothing else: no account, no user interaction, no agent of its own. The CVSS vector is network, low complexity, no privileges, high confidentiality and integrity impact (CVE record). A server on the public internet is exposed to anyone. A server on an internal network is exposed to anything on it, including a compromised laptop or agent host.

The worst realistic outcome is a pipeline that hands its deploy credentials, signing keys and source to an attacker and then ships their binaries. Pipelines that pass cloud credentials, registry logins or SSH keys to builds are the richest targets. The blast radius JetBrains describes is the secrets and artifacts of the builds routed to the displaced agent; the advisory lists no access to the server's own files, and tells you to "run the server and build agents on separate hosts" (JetBrains advisory).

Branch Affected Fixed in Build
2026.3not affected2026.3268273
2026.22026.2 to 2026.2.22026.2.3239430
2026.12026.1 to 2026.1.62026.1.7223148
2025.11 and olderall versionsno fixed build; upgrade, or apply the patch plugin (2021.2 and later)
TeamCity Cloudnot affectedfixed by JetBrains

TeamCity is not packaged by Linux distributions, so there are no Debian, Ubuntu, Alpine, Amazon Linux or Red Hat trackers. The official image jetbrains/teamcity-server has tags 2026.3, 2026.2.3 and 2026.1.7, all pushed on 2 December 2026, and latest is 2026.3 (Docker Hub). Not affected: TeamCity Cloud, and any server on a fixed build or carrying the patch plugin.

3. How to check if you are affected

Every command here only reads. Compare versions by branch, not by raw build number: a 2026.2.0 server has a higher build number than 2026.1.7 and is still vulnerable.

  1. Ask the server over REST. The entry point is /app/rest/server, with an access token from My Settings & Tools | Access Tokens in a Bearer header, or httpAuth in the path for basic auth (REST API, server entity). The version field holds the full version with build number. Anything below 2026.1.7, 2026.2.3 or 2026.3 for its branch is affected.
curl -s --header "Accept: application/json" --header "Authorization: Bearer <token>" https://teamcity.example.com/app/rest/server
  1. Check for the patch plugin. Installed security patches appear under Admin | Plugins; pending ones under Admin | Updates, Security patches (upgrading guide). A vulnerable build with the CVE-2026-136858 patch listed is fixed.
  1. Archive or installer on a host. The TeamCity home directory holds a file named BUILD_<number> with the server build number (home directory).
ls <TeamCity Home> | grep '^BUILD_'
head -n 5 <TeamCity Home>/logs/teamcity-server.log
  1. Container image. The version is the image tag, and TeamCity lives in /opt/teamcity inside the official image (Docker Hub). A latest tag tells you nothing until you look inside.
docker ps --format '{{.Names}} {{.Image}}' | grep -i teamcity
docker exec <container> ls /opt/teamcity | grep '^BUILD_'
grep -i 'FROM .*teamcity-server' Dockerfile
  1. Kubernetes. List images and compare tags with the table (kubectl jsonpath).
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.spec.containers[*].image}{"\n"}{end}' | grep -i teamcity
  1. AWS. On ECS, read the image from each task definition. On EC2, use step 1 or 3 on the instance (describe-task-definition).
aws ecs describe-task-definition --task-definition <family> --query 'taskDefinition.containerDefinitions[*].image'
  1. Reachability. Check whether the server's HTTP(S) port answers from the internet or from networks that hold no agents. A yes turns important into urgent.

Agents need no check. The flaw is server-side and "all connected agents upgrade automatically, provided they are correctly installed" after a server upgrade (upgrading guide).

4. How to fix it

JetBrains offers two routes: update the server, or apply the security patch plugin, which "addresses the specific vulnerability described above and can be installed without restarting the TeamCity server" (JetBrains advisory). Every step below changes the server. Back up first.

  1. Pick the target. 2026.2.x goes to 2026.2.3, 2026.1.x to 2026.1.7. On 2025.11 or older, either jump to 2026.3 or apply the plugin now and schedule the major upgrade. Bug-fix updates within one major version share the data format, so 2026.2.2 to 2026.2.3 can be rolled back without a restore (bug-fix announcement).
  1. Archive or installer on a host. Use Admin | Updates. Automatic update "is available only for .tar.gz and .exe installations": the server stops, the old installation is copied to <TeamCity Home Directory>/.old, the new version is installed and the server starts. Or download the build from the other versions page and unpack it over the old installation, keeping the data directory and database intact. In a multi-node setup "each node needs an individual upgrade" (upgrading guide).
  1. Docker. "Manual update is the only option for Docker containers." Change the tag, stop the old container, run the new one on the same data and log volumes (upgrading guide, Docker Hub).
# changes the running service
docker pull jetbrains/teamcity-server:2026.2.3
docker stop <container>
docker run -d --name teamcity-server -v <datadir>:/data/teamcity_server/datadir -v <logs>:/opt/teamcity/logs -p 8111:8111 jetbrains/teamcity-server:2026.2.3
  1. Kubernetes and ECS. Set the image to jetbrains/teamcity-server:2026.2.3, 2026.1.7 or 2026.3 in the manifest or task definition, apply it, and let the server pod or task restart.
  1. Security patch plugin. On 2026.2.2 and later, Admin | Updates, Security patches set to "Install automatically" installs it unattended; "Download and notify", the default, downloads it and waits for you. On 2024.03 through 2026.2.1, apply it under "Available security updates" on the same page. On any version from 2021.2, download CVE-2026-136858-patch.zip and upload it as a plugin (JetBrains advisory, installing plugins). The 2026.2.3 and 2026.1.7 updates also fix "Errors on checking for new security patches" (bug-fix announcement), so a server that saw no patches before may need the manual upload.
  1. Confirm. Repeat check 1 and expect 2026.1.7, 2026.2.3 or 2026.3, or check 2 and expect the patch under Admin | Plugins. Then watch the Agents page: agents reconnect and upgrade, and "no new builds are started on the agent unless the agent is up to date with the server".

5. If you cannot patch today

JetBrains documents one mitigation beyond the plugin: "configure your reverse proxy or another path-aware access control to allow requests to /app/agents and its subpaths only from IP addresses where you expect legitimate build agents to originate", including cloud agent egress addresses and NAT gateways (JetBrains advisory). Its limit: an attacker on an allowed address, such as a compromised agent host, still gets through, and a wrong list silently breaks agents. Test against the Agents page.

The advisory's remaining advice is generic exposure cutting: limit the server to trusted networks, use a VPN for agents and users outside them, and run server and agents on separate hosts. Since the plugin installs without a restart on anything from 2021.2, there is little reason to end the day without one of the two real fixes.

6. How to tell if you were already hit

JetBrains publishes one indicator. Search teamcity-server.log for entries containing:

of the existing agent, but different authorization token "<token>"

"A non-empty token may indicate an attempt to take over an existing build agent. Entries with an empty token are expected and can be disregarded for this check." For a hit with a non-empty token, use the timestamp to review that agent's connection history and the builds assigned to it, confirm the hostname and source IP match the real agent, and compare build logs, results and artifacts to see whether the attempt succeeded (JetBrains advisory).

If you suspect exploitation, JetBrains says to preserve logs and build results, patch, rotate every credential passed to the affected builds, and treat their artifacts as untrusted until verified. No report of attacks, scanning or a working exploit exists as of 3 December 2026. The general pattern after a CI breach is that secrets handed to the build are used elsewhere within minutes, so watch the cloud and registry accounts they unlock.

7. How autonomous DevOps handles a bug like this

Compass, Beamreach's open-source operations agent for AWS, helps with two of the three things this CVE asks for, and only partly (Compass on GitHub).

The first question is "which TeamCity do we run, and is it reachable from the internet?" For a TeamCity server running as a container on ECS, Compass's inventory already holds the image each task definition runs and whether the workload faces the internet, which answers checks 4, 6 and 7 without a command. For TeamCity on Kubernetes, on an EC2 instance or on premises, which is how most installations run, the map does not help and the REST call in check 1 stays the fastest route.

The fix is the kind of edit a patch pull request can make: jetbrains/teamcity-server:2026.2.2 becomes 2026.2.3 in a task definition or Dockerfile, a deterministic tag change that CI verifies. The catch is the finding. TeamCity is not on Compass's default product list for the CVE feed, Java is not either, and an image tag is not an OSV package, so Compass does not raise this CVE on its own; a person has to bring it. A major upgrade from 2025.11 to 2026.3, and the plugin route, are not changes a patch pull request makes; those stay with a person.

For the window before the fix lands, this attacker wants exactly what a honeytoken offers: credentials passed to builds. A decoy AWS key, planted as a Terraform pull request, trips the moment anyone tries it, so a build that receives one alongside its real credentials becomes a tripwire for exactly this intercept; the gated response, deactivating the key with a snapshot and an audit entry, can be undone. It does not block the registration request, does not fix the server, and catches only an attacker who touches the decoy, so keep CloudTrail and GuardDuty beside it. Four days to contain React2Shell with alerts alone, against under two minutes for PHP2Shell with a honeytoken, is the case for a tripwire in every pipeline that handles cloud credentials (PHP2Shell write-up).

8. Sources

9. FAQ

Is my TeamCity affected by CVE-2026-136858?

If you run TeamCity On-Premises on any version before 2026.1.7, 2026.2.3 or 2026.3 without the CVE-2026-136858 patch plugin, yes; JetBrains says the flaw "affects all TeamCity On-Premises versions". Read the version from /app/rest/server or the BUILD_<number> file in the home directory and compare by branch. TeamCity Cloud is not affected.

Which TeamCity version fixes CVE-2026-136858?

2026.1.7 (build 223148) for the 2026.1 branch, 2026.2.3 (build 239430) for the 2026.2 branch, and 2026.3 (build 268273), all released on 2 December 2026. Servers on 2025.11 or older have no fixed build in their branch and must upgrade or apply the security patch plugin, available for 2021.2 and later.

Is CVE-2026-136858 being exploited?

Not as far as anyone has published. JetBrains was "not aware of any active exploitation" on 2 December 2026, CISA's SSVC assessment records "Exploitation: none", and the CVE is not in the Known Exploited Vulnerabilities catalog as of 3 December 2026. The attack needs no account and no user interaction, so that can change quickly.

Is there a workaround for CVE-2026-136858 if I cannot upgrade TeamCity?

Two. The JetBrains security patch plugin fixes only this CVE and installs without a restart on TeamCity 2021.2 or later; servers on 2026.2.2 and later with "Install automatically" enabled pick it up by themselves. Separately, allow requests to /app/agents and its subpaths only from your agents' IP addresses at the reverse proxy. The allowlist does not stop an attacker already on an agent's address.

Do I need to update my TeamCity build agents for CVE-2026-136858?

No. The flaw is in the server's handling of agent registration and the fix is server-side. After the server upgrade, connected agents upgrade themselves and start no new builds until they match the server. Do review the Agents page for agents you do not recognise, and search the server log for the "different authorization token" indicator.

Related

Last checked: 3 December 2026. Written from the vendor advisory and the CVE record, linked below. Confirm against the vendor advisory before acting.

Related: CVE Watch: all pages · How to protect against *2Shell vulnerabilities · Automated patching compared · AWS canary credentials