JetBrains Patches Critical TeamCity Flaw That Lets Attackers Impersonate Build Agents
TLDR
- JetBrains fixed CVE-2026-136858, a critical TeamCity On-Premises flaw letting unauthenticated attackers impersonate build agents.12
- watchTowr says it saw attempted exploitation within a day of disclosure; JetBrains' bulletin reports none observed.156
- Fixed in TeamCity 2026.1.7, 2026.2.3 and 2026.3; a restart-free patch plugin covers 2021.2 and later.1
JetBrains disclosed a critical flaw in TeamCity On-Premises, CVE-2026-136858, on 2 December 2026.1 The vendor says an unauthenticated attacker who can reach the server over HTTP or HTTPS, with no TeamCity user account, could impersonate an existing authorised build agent.1 That could let them intercept builds, access secrets passed to the agent and tamper with build results and artifacts, and downstream builds that consume tampered artifacts could execute attacker-supplied code.1 The CVE record describes an authentication bypass during agent registration that allowed takeover of authorised build agents, and carries a CVSS 3.1 base score of 9.1, with network attack vector, low complexity and no privileges or user interaction required.23
All TeamCity On-Premises versions are affected, and JetBrains says the fix is in 2026.1.7, 2026.2.3 and 2026.3.1 For servers that cannot be updated, a security patch plugin for TeamCity 2021.2 and later installs without a server restart, though it addresses only this vulnerability.1 Servers on 2026.2.2 or later with automatic security patch installation enabled should install it automatically.1 JetBrains says it has already applied corrective measures to TeamCity Cloud and found no evidence that any Cloud environment was exploited, so Cloud customers need take no action.1 It says researcher Jiawei Guo reported the issue privately on 24 November 2026, and that it is not aware of active exploitation at the time of publishing.1 CISA's entry in the CVE record lists exploitation as "none" and the flaw as automatable.2
For servers that cannot be patched at once, JetBrains advises configuring a reverse proxy or other path-aware access control to allow requests to /app/agents and its subpaths only from the IP addresses where legitimate build agents are expected, including cloud agents and any NAT gateways.13 It also tells administrators to search teamcity-server.log for entries containing "of the existing agent, but different authorization token" followed by a token, where a non-empty token may indicate a takeover attempt and an empty one is expected.1 If exploitation is suspected, it advises preserving logs, patching and rotating credentials passed to potentially affected builds, and treating artifacts from those builds as untrusted until verified.1 Help Net Security says JetBrains did not detail the root cause, and notes that build agents are typically handed credentials such as deployment keys, cloud tokens and package registry passwords.4
Help Net Security calls this the second critical, unauthenticated TeamCity flaw JetBrains has fixed in a little over four months, after CVE-2026-63077, which it says was patched in late July and added to CISA's Known Exploited Vulnerabilities catalogue roughly a week after disclosure.4 The Hacker News says CISA reported that earlier flaw, which carries a CVSS score of 9.8, as weaponised in real-world attacks.3 Help Net Security adds that TeamCity On-Premises servers have previously been targeted by state-sponsored and financially motivated actors through authentication bypass flaws CVE-2023-42793 and CVE-2024-27198, and says CVE-2026-136858 in effect opens the door to a software supply chain attack.4
Why it matters: organisations running self-hosted TeamCity should patch or restrict agent access promptly and review server logs, since a taken-over agent exposes the secrets and artifacts that later builds depend on.14
Update, 5 December 2026, exploitation reported: BleepingComputer and CSO Online report that attackers are trying to exploit CVE-2026-136858, about a day after JetBrains disclosed it.56 Both cite watchTowr, a security firm, which says its honeypot network captured attempted in-the-wild exploitation aimed at taking over build agents.56 BleepingComputer quotes watchTowr as saying this began one day after initial disclosure, and CSO Online dates the captured attempts to Thursday, less than a day after JetBrains released patches.56 watchTowr says exploitation requires guessing a build agent ID, which BleepingComputer describes as no real obstacle because the IDs typically start at 1 and are relatively easy to predict.56
CSO Online quotes Jake Knott, watchTowr's head of threat intelligence, as saying that measuring exploitation in minutes or hours after disclosure is "the new reality".6 CSO Online adds that the exploit attempts watchTowr saw appear to come from a threat actor hunting for high-impact vulnerabilities, which it says recently used the PHP2Shell flaw against a Palo Alto PAN-OS device in watchTowr's honeypot network.6 It says attackers who impersonate a build agent can capture credentials and other secrets passed to it, falsify build results and publish tampered artifacts that other workflows could later execute.6
The reports so far come from watchTowr rather than JetBrains: BleepingComputer notes that JetBrains' bulletin, published on 2 December, says the vendor has observed no active exploitation.5 BleepingComputer relays watchTowr's wording of "attempted" exploitation, while CSO Online's headline says the flaw is exploited in the wild and its text says the attackers observed so far are guessing agent ID numbers.56 The mitigation advice is unchanged: update to 2026.1.7, 2026.2.3 or 2026.3, or install the security patch plugin, restrict /app/agents to the IP addresses of expected agents, and check teamcity-server.log for entries with a non-empty token.56
Why it matters: watchTowr reports attempted exploitation within a day of disclosure, so organisations running self-hosted TeamCity should patch or restrict agent access at once, review agent logs and rotate credentials if a takeover is suspected.156
Sources
- Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858): Update to 2026.1.7, 2026.2.3, or 2026.3 Now (The JetBrains Blog)
- CVE-2026-136858 (CVE Program (JetBrains CNA))
- Critical JetBrains TeamCity Flaw Lets Attackers Hijack Build Agents Without Authentication (The Hacker News)
- Critical TeamCity flaw lets unauthenticated attackers pose as build agents, grab secrets (CVE-2026-136858) (Help Net Security)
- Critical JetBrains TeamCity flaw exploited to hijack build agents (BleepingComputer)
- JetBrains TeamCity flaw exploited in the wild to steal dev credentials (CSO Online)