TeamCity CVE-2026-136858 (CVSS 9.1): Unauthenticated Attackers Can Hijack Authorised Build Agents to Steal Secrets and Plant Tampered Artifacts — Update to 2026.1.7, 2026.2.3 or 2026.3

DevSecOps · 2026-12-03 · By Reef Reporter

TeamCity CVE-2026-136858 (CVSS 9.1): Unauthenticated Attackers Can Hijack Authorised Build Agents to Steal Secrets and Plant Tampered Artifacts — Update to 2026.1.7, 2026.2.3 or 2026.3

JetBrains fixed a critical TeamCity On-Premises authentication bypass that lets anyone reaching the server impersonate a build agent, intercept build secrets and tamper with artifacts, with a patch plugin back to 2021.2 and log checks to spot takeover attempts.

JetBrains has fixed a critical authentication bypass in TeamCity On-Premises, tracked as CVE-2026-136858 (CVSS 9.1), that lets an unauthenticated attacker who can reach the server over HTTP(S) take the place of an existing, already-authorised build agent. Once in that position, the attacker receives the builds meant for the real agent, along with the passwords, tokens and keys those builds use, and can send back falsified results and tampered artifacts.

Every TeamCity On-Premises version is affected. The fixed releases are 2026.1.7, 2026.2.3 and 2026.3, and a no-restart security patch plugin covers servers back to 2021.2. JetBrains says it is not aware of exploitation, but TeamCity servers have been a favourite target before, so treat this as an urgent patch.

What Happened

The advisory went out on 2 December, and the CVE record was published at 02:18 Mauritius time on 3 December (22:18 UTC, 2 December). Security researcher Jiawei Guo reported the flaw privately to JetBrains on 24 November 2026, so the fix took about a week.

JetBrains describes the bug as an "authentication bypass during agent registration" that "allowed takeover of authorized build agents". The CVE record classifies it as CWE-639 (authorisation bypass through a user-controlled key). The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N: network-reachable, low complexity, no privileges, no user interaction, with high impact on confidentiality and integrity.

In its SSVC assessment, CISA marks the flaw as automatable with total technical impact and no exploitation so far. That combination usually means a quick move to mass scanning once a working exploit is public.

TeamCity Cloud is not affected any more: JetBrains says it has already fixed its hosted service and found no evidence that any Cloud environment was exploited. Cloud customers don't need to do anything.

Technical Details

TeamCity splits work between a central server and build agents. The server keeps a list of authorised agents, each identified by an authorisation token. It sends build jobs to them, together with the credentials, parameters and secrets each job needs. Agents return logs, test results and artifacts, which later builds and deployment pipelines often consume automatically.

CVE-2026-136858 breaks the trust in that registration step. JetBrains has not published the root cause, but the impact is clear:

This is not remote code execution on the TeamCity server itself, unlike earlier TeamCity bugs. For a CI/CD system, though, the outcome can be just as serious. An attacker who can quietly swap a release binary or container image, or collect the credentials used to publish them, has a direct route into software supply chains.

Who Is Affected

TeamCity Cloud customers are covered by JetBrains' server-side fix.

Patch Status

JetBrains offers two options:

From TeamCity 2024.03, the server can download security patches by itself. Go to Administration | Updates:

JetBrains points out that the plugin fixes only this flaw. This matters because JetBrains disclosed more than 200 TeamCity flaws on 21 November, including a CVSS 9.8 remote code execution bug (CVE-2026-132891). Servers still on 2026.2.1 or 2026.1.5 or earlier should do a full upgrade, not just add the plugin.

What To Do Now

of the existing agent, but different authorization token "

A non-empty token value may mean someone tried to take over an existing agent. Entries with an empty token ("") are normal and can be ignored.

grep -n 'of the existing agent, but different authorization token' /path/to/TeamCity/logs/teamcity-server.log* \
  | grep -v 'authorization token ""'

Why It Matters

TeamCity is one of the CI/CD platforms attackers already know well. Two earlier authentication bypasses, CVE-2023-42793 and CVE-2024-27198, were exploited in the wild soon after disclosure, including by state-backed groups. Build servers are valuable targets because they hold the keys to production and to the software customers install.

The timing doesn't help either. JetBrains has published no exploit details, but the advisory names the vulnerable endpoint path and the log line that shows an attempt. That gives skilled attackers, and the AI-assisted tooling now used to turn patches into exploits, a clear place to start. CISA's "automatable" rating means attackers can scan the internet for vulnerable servers once an exploit exists.

The flaw is also a reminder that a CI pipeline is only as trustworthy as its least-protected agent. Even when no attack is found, restricting where agents can register from, keeping secrets short-lived and narrowly scoped, and verifying artifacts before release all limit the damage the next agent-trust bug can do.

Sources

REEF SENTINEL