TeamCity CVE-2026-136858: Hijack Build Agents, No Login

By 12 min read
TeamCity CVE-2026-136858, a critical build agent impersonation flaw in TeamCity On-Premises

A stranger on the network can tell a TeamCity server “I am your build agent”, and the server will believe it. That is the core of CVE-2026-136858, a critical TeamCity flaw that JetBrains disclosed on 2 December 2026, and it means build secrets and build output can land in the wrong hands without a single password being guessed.

In short: CVE-2026-136858 is an authentication flaw in JetBrains TeamCity On-Premises, scored 9.1, that lets an unauthenticated attacker who can reach the server over HTTP(S) impersonate an existing authorized build agent. JetBrains says every On-Premises version is affected and the fix is in TeamCity 2026.1.7, 2026.2.3 and 2026.3, with a patch plugin for 2021.2 and later. The issue was first made public on 2 December 2026 in the JetBrains TeamCity blog advisory, after a private report on 24 November.

What is TeamCity CVE-2026-136858?

CVE-2026-136858 is a critical vulnerability in how TeamCity On-Premises decides which build agent it is talking to. JetBrains’ advisory says an attacker does not need a TeamCity user account; network access to the server over HTTP or HTTPS is enough to pose as a legitimate, already authorized agent.

The Hacker News and SecurityOnline both report a CVSS score of 9.1. SecurityOnline classifies the weakness as CWE-639, authorization bypass through a user-controlled key, which describes a system that trusts an identifier the client supplies. JetBrains’ advisory does not publish a CVSS vector string.

TeamCity is JetBrains’ continuous integration and delivery (CI/CD) server. CI/CD servers pull source code, run builds and tests, and push the results toward production, so they usually hold the credentials for code repositories, package registries, cloud accounts and deployment targets.

Four figures for TeamCity CVE-2026-136858: CVSS 9.1, no account needed, 8 days to fix, 4 older KEV entries
A 9.1 flaw that needs no account, on a product with four earlier entries in CISA's exploited list. Data: JetBrains advisory, CISA KEV catalog.

What is a TeamCity build agent, and why does impersonating one matter?

A build agent is a worker machine that runs the jobs the TeamCity server hands out. The server sends the agent a checkout of the code, build parameters and any secrets the build needs; the agent runs the steps and sends back logs, test results and artifacts, the files a build produces, such as binaries, container images or packages.

That makes the agent a trusted insider in both directions. It receives secrets, and its output is trusted by everything downstream. Agents register with the server and are then authorized, either by an administrator or automatically, depending on configuration.

What an attacker gets from a fake agent

JetBrains lists three consequences in its advisory:

  • Intercepted builds. The attacker can displace a legitimate agent and receive builds assigned to it.
  • Exposed secrets. Credentials and other secrets passed to the agent for those builds are exposed.
  • Tampered results and artifacts. The attacker can falsify build results or publish altered artifacts. JetBrains warns that downstream builds that consume those artifacts could execute attacker-supplied code.

The last point is the serious one. A hijacked agent is not only a data leak; it is a way to insert code into software that other systems trust and deploy.

Six-step flow from reaching a TeamCity server to downstream builds running tampered artifacts
The server never runs attacker code directly; the danger is what the fake agent sends back. Data: JetBrains advisory for CVE-2026-136858.

How does the TeamCity agent hijack work?

JetBrains has published the impact but not the root cause, and no public proof of concept was found for this article. What can be said from the advisory is conceptual.

Agent identity rests on an authorization token

Each TeamCity agent carries an authorization token that ties it to its record on the server. The advisory’s detection guidance refers to server log messages about an agent connecting with the identity of an existing agent but a different authorization token. That indicates the attack involves registering as an agent that already exists and getting the server to accept the newcomer in its place.

No account, only network reach

The precondition is simple: the attacker must be able to send HTTP(S) requests to the TeamCity server. JetBrains’ extra mitigation focuses on the /app/agents path and its subpaths, which is where agent traffic goes. Servers that expose that path to the internet are the most at risk.

What JetBrains does not say

The advisory does not describe code execution on the TeamCity server itself, a forged administrator session, or access to the web interface. Readers should not assume any of those. The risk JetBrains describes lives in the build pipeline: secrets out, tampered artifacts in.

Who is affected, and how do you check exposure?

JetBrains says all versions of TeamCity On-Premises are affected. TeamCity Cloud has been fixed by JetBrains, and the company says it found no evidence that any Cloud environment was exploited.

Situation Status Action
TeamCity Cloud Fixed by JetBrains None required
On-Premises 2026.1.7, 2026.2.3 or 2026.3 Fixed Verify version, then check logs
On-Premises 2026.2.2 or later, auto security patches on Should self-patch Confirm the patch is installed
On-Premises 2021.2 to current, cannot upgrade Vulnerable Install the security patch plugin
On-Premises older than 2021.2 Vulnerable, no plugin Upgrade; restrict network access now

To check exposure, start with the version shown in the TeamCity web interface footer or under Administration, then confirm whether /app/agents is reachable from networks where no build agent lives. A server reachable from the internet with agents in one office or one cloud network is the clearest case for an IP allowlist.

Teams that use cloud agents should note JetBrains’ warning: an allowlist has to include the outbound addresses cloud agents use, including NAT gateways, or legitimate builds will break.

How did TeamCity flaws fare before? A comparison

TeamCity has a track record that makes “not exploited yet” a weak comfort. CISA’s Known Exploited Vulnerabilities (KEV) catalog, the US government list of flaws confirmed as used in real attacks, contains four TeamCity entries.

CVE What it was CVSS CVE published Added to KEV
CVE-2023-42793 Authentication bypass to RCE, before 2023.05.4 9.8 19 Sep 2023 4 Oct 2023
CVE-2024-27198 Authentication bypass to admin actions, before 2023.11.4 9.8 4 Mar 2024 7 Mar 2024
CVE-2024-27199 Relative path traversal, limited admin actions Not checked Not checked 20 Apr 2026
CVE-2026-63077 Unauthenticated RCE via the agent polling protocol 9.8 27 Jul 2026 5 Aug 2026
CVE-2026-136858 Agent impersonation, no account 9.1 2 Dec 2026 Not listed on 3 Dec

CVSS figures and publication dates come from NVD; KEV dates come from the CISA KEV feed.

Bar chart of days from CVE publication to CISA KEV listing for three earlier TeamCity flaws
The three critical TeamCity flaws before this one reached CISA's exploited list in 3 to 15 days. Data: NVD publication dates, CISA KEV dateAdded.

CVE-2023-42793 and APT29

CISA’s joint advisory AA23-347A, released on 13 December 2023 with the FBI, NSA and Polish and UK partners, says the Russian Foreign Intelligence Service (SVR), tracked as APT29, the Dukes, CozyBear and NOBELIUM/Midnight Blizzard, exploited CVE-2023-42793 at large scale from September 2023. The agencies said the targeting looked opportunistic. After access, the actors dumped credentials, disabled security tools with a vulnerable driver and set up scheduled tasks for persistence. The advisory says they had not yet used that access to reach software customers.

CVE-2026-63077 and the Cadence breach

The closer match is CVE-2026-63077, because it also lived in the agent side of TeamCity. CISA describes it as unauthenticated remote code execution through the agent polling protocol. The Hacker News reported that JetBrains announced it around 28 July 2026; CISA added it to KEV on 5 August, and Rapid7 published an analysis with a proof of concept on 7 August.

JetBrains itself was then hit. According to The Hacker News, citing JetBrains, attackers exploited CVE-2026-63077 to breach the company’s Cadence cloud compute service between 8 and 24 August 2026, reaching user data, a 2024 server backup and AWS IAM credentials. JetBrains conceded the server should have been patched.

Timeline from CVE-2026-63077 in July 2026 to the CVE-2026-136858 fix on 2 December 2026
The last agent protocol flaw was in KEV within nine days and inside JetBrains' own service within two weeks. Data: NVD, CISA KEV, JetBrains via The Hacker News.

The difference this time is impact. CVE-2026-63077 gave command execution on the server; CVE-2026-136858, as described, gives control of an agent’s identity. That is a narrower foothold, but in a CI/CD system it can still lead to the same outcome: stolen deployment credentials and poisoned builds. The pattern resembles other pipeline attacks covered here, such as the WPPConnect supply chain attack with valid provenance, where trusted build output carried bad code.

How do you detect CVE-2026-136858 exploitation?

JetBrains gives one specific check. Search teamcity-server.log for entries containing:

of the existing agent, but different authorization token

followed by a token value. JetBrains says a non-empty token may indicate an attempt to take over an existing agent. Entries where the token is empty ("") are expected and can be ignored.

What to do with a hit

For each suspicious entry, JetBrains recommends using the timestamp to:

  1. Review the affected agent’s connection history around that time.
  2. Check that the agent’s hostname and source IP address match what you expect.
  3. Compare build logs, build results and published artifacts for builds assigned to that agent.
  4. Decide whether the attempt succeeded.

Wider signals worth watching

Beyond the JetBrains log check, defenders can look for:

  • Requests to /app/agents from IP addresses that are not known agent hosts, in reverse proxy or web server logs.
  • An agent appearing with a new IP or hostname while the real agent machine shows it was idle or disconnected.
  • Builds that completed suspiciously fast, or artifacts whose hashes differ from a rebuild of the same commit.
  • Use of credentials scoped to TeamCity builds from unusual locations, in cloud, registry and repository audit logs.

In MITRE ATT&CK terms, the behaviours JetBrains describes map most closely to T1199 (Trusted Relationship) for abusing the agent’s trusted position and T1195.002 (Compromise Software Supply Chain) for tampered artifacts. That mapping is this article’s, not JetBrains’.

How do you fix it? Mitigation in priority order

  1. Upgrade to TeamCity 2026.1.7, 2026.2.3 or 2026.3, or use TeamCity’s automatic update option.
  2. If you cannot upgrade, install the security patch plugin. JetBrains released it for TeamCity 2021.2 and later; it fixes only this CVE and needs no restart. From 2024.03, TeamCity can download pending security patches under Administration, Updates.
  3. Turn on automatic security patches if you run 2026.2.2 or later, so the next fix lands without waiting for a maintenance window.
  4. Restrict /app/agents at the reverse proxy to the IP addresses of real agents, including cloud agent egress and NAT gateways.
  5. Run the log check above for the period before you patched.
  6. If you find signs of exploitation, preserve logs and build results, patch, rotate every credential passed to affected builds, and treat their artifacts as untrusted until verified and traced to where they were deployed.
  7. Reduce exposure for the long run. JetBrains recommends limiting TeamCity to trusted networks, using a VPN for outside users and agents, and running the server and agents on separate hosts.

Rotating secrets is the step teams most often skip. A patch stops new impersonation; it does nothing about a token that already left. The same lesson appears in the Docker Hub secrets case, where a leaked key was used in 7.86 seconds, and in how a GitHub dev branch can reach tier zero.

Is it as bad as earlier TeamCity bugs? Limits and caveats

It is not magic, and it is not a server takeover as far as anyone has shown.

  • No exploitation known at disclosure. JetBrains said so on 2 December, and the CVE was not in CISA KEV on 3 December.
  • No public exploit found. No proof of concept or technical write-up was located for this article.
  • Network reach is required. A TeamCity server that agents reach only over a private network or VPN is much harder to attack this way.
  • The damage depends on your pipeline. A fake agent only sees builds routed to the agent it displaces. Builds with few secrets and no deployment step are less valuable to an attacker than release pipelines.

On the other side, every On-Premises version is affected, the fix has been public only since 2 December, and the last agent-side TeamCity bug was exploited within days. The caveats argue for calm, not for delay.

What is still unknown?

  • Root cause. JetBrains has not explained exactly why the server accepted a second agent with the same identity.
  • CVSS vector. The 9.1 score is reported, but the vector string was not published in the sources read.
  • Exposure count. No source gives the number of internet-facing TeamCity servers.
  • Related fixes. SecurityOnline reports that JetBrains disclosed 12 flaws on 2 December, mostly in Ktor and Kotlin, with this TeamCity bug the only critical one. That batch list could not be checked against JetBrains’ own table.
  • Older versions. Servers older than 2021.2 have no patch plugin; JetBrains does not say how many customers run them.

The bottom line

TeamCity CVE-2026-136858 lets anyone who can reach your TeamCity server pose as one of your build agents, read the secrets you hand it and send back tampered artifacts. Patch to 2026.1.7, 2026.2.3 or 2026.3 or install the patch plugin today, then check teamcity-server.log for non-empty agent tokens. TeamCity’s history says the window before attackers arrive is measured in days, not months.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What is CVE-2026-136858?

CVE-2026-136858 is a critical vulnerability in JetBrains TeamCity On-Premises, scored 9.1. An unauthenticated attacker who can reach the TeamCity server over HTTP(S) can impersonate an existing authorized build agent and receive its builds, secrets and artifacts.

Which TeamCity versions are affected by CVE-2026-136858?

JetBrains says all TeamCity On-Premises versions are affected. The fixed releases are 2026.1.7, 2026.2.3 and 2026.3. TeamCity Cloud was fixed by JetBrains and needs no customer action.

Is CVE-2026-136858 being exploited?

JetBrains said it was not aware of any active exploitation when it published the advisory on 2 December 2026, and the CVE was not in CISA's KEV catalog on 3 December. Earlier TeamCity flaws were exploited within days of disclosure, so that can change quickly.

How do I patch TeamCity if I cannot upgrade?

Install the security patch plugin JetBrains released for TeamCity 2021.2 and later. It fixes only CVE-2026-136858 and does not require a server restart. Servers on 2026.2.2 or later with automatic security patch installation enabled should pick it up on their own.

How do I check if my TeamCity server was attacked?

JetBrains says to search teamcity-server.log for the text 'of the existing agent, but different authorization token' followed by a non-empty token. Entries with an empty token are normal. For any hit, review that agent's connection history, source IP, hostname and the builds it ran around that time.

Does CVE-2026-136858 give remote code execution on the TeamCity server?

JetBrains does not describe code execution on the server itself. The risk is code execution further down the line: tampered artifacts from a hijacked agent could run attacker-supplied code in downstream builds or deployments.

Who found CVE-2026-136858?

Security researcher Jiawei Guo reported it privately to JetBrains on 24 November 2026 under the company's coordinated disclosure policy. JetBrains published fixes and the advisory eight days later, on 2 December.

What is a TeamCity build agent?

A build agent is a separate machine or container that runs the build jobs the TeamCity server assigns to it. The server sends it source code, build parameters and credentials, and the agent sends back logs, test results and artifacts.

Keep reading

TeamCityCVE-2026-136858JetBrainsCI/CD securitybuild agentssupply chain securityvulnerability management