Critical TeamCity flaw lets unauthenticated attackers pose as build agents, grab secrets (CVE-2026-136858)

JetBrains has fixed a critical authentication bypass vulnerability (CVE-2026-136858) in TeamCity On-Premises that allows unauthenticated attackers to impersonate legitimate build agents.

Successful exploitation could allow them to intercept builds, access the secrets passed to them, and tamper with build results and artifacts, the company warned on Wednesday.

About TeamCity

TeamCity is JetBrains’ continuous integration and continuous delivery (CI/CD) server, i.e., the software that automatically builds, tests, packages and often deploys an organization’s code every time a developer pushes a change.

It’s offered as a JetBrains-hosted service (TeamCity Cloud) and as a self-hosted product (TeamCity On-Premises), which organizations run on their own infrastructure or in a cloud.

A TeamCity installation consists of a central server, which coordinates the work, and build agents, the separate machines that actually run the builds. Before an agent can receive work, an administrator usually has to authorize it.

Agents talk to the server over HTTP(S) via the agent polling protocol. Along with each build, the server hands the agent whatever it needs to complete it, which often includes credentials such as deployment keys, cloud tokens and package registry passwords, which makes an authorized agent a very attractive thing to impersonate.

About CVE-2026-136858

JetBrains did not detail the root cause of the vulnerability, but said it can be exploited by attackers who can reach the TeamCity server over HTTP(S), and that they don’t need a TeamCity user account to do it.

“A successful exploitation could displace a legitimate build agent and intercept builds assigned to it. This can expose credentials and other secrets passed to the agent,” JetBrains explained.

Attackers could also falsify build results or publish tampered artifacts, which means that downstream builds that consume those artifacts could end up running attacker-supplied code. In effect, CVE-2026-136858 opens the door to a software supply chain attack.

The flaw was privately reported by security researcher Jiawei Guo on November 24, 2026.

“At the time of publishing this advisory, we are not aware of any active exploitation of this vulnerability,” JetBrains said. The company has “applied the necessary corrective measures to TeamCity Cloud and [they] have found no evidence that any TeamCity Cloud environment was exploited through this vulnerability.”

This is the second critical, unauthenticated TeamCity flaw JetBrain fixed in a little over four months. The first, CVE-2026-63077, was patched in late July and added to CISA’s Known Exploited Vulnerabilities catalog roughly a week after disclosure.

TeamCity On-Premises servers have previously been targeted by both state-sponsored and financially motivated threat actors, via authentication bypass flaws CVE-2023-42793 and CVE-2024-27198.

What to do?

JetBrains advises TeamCity On-Premises customers to:

  • Update their servers to 2026.1.7, 2026.2.3, or 2026.3, or
  • Install the security patch plugin if they can’t restart the server for an update right away (the plugin supports TeamCity 2021.2 and later, and fixes only this vulnerability)

“As an additional mitigation, 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. Include the outbound addresses used by cloud agents and any NAT gateways they connect through,” the company counseled.

Admins can also check teamcity-server.log for entries containing the message of the existing agent, but different authorization token. According to JetBrains, an entry where that token is non-empty may indicate a takeover attempt, while an empty token is expected behavior.

JetBrains provided further advice on how to verify whether the exploitation attempt succeeded and what to do if it has.

Dive deeper

Free tools to verify and analyze what this article covers:

source: HelpNetSecurity