On 2 December 2026 JetBrains disclosed TeamCity CVE-2026-136858, a critical authentication bypass in TeamCity On-Premises. According to the JetBrains advisory, exploitation needs no authentication and no TeamCity account. The server only has to be reachable over HTTP(S). A successful attacker could displace a legitimate build agent and intercept the builds assigned to it, which can expose credentials and other secrets passed to the agent.
Our take: a CI server belongs in the same tier as production. Patch it in hours, not at the next maintenance window.
What happened
JetBrains says all versions of TeamCity On-Premises are affected, and the issue is fixed in 2026.1.7, 2026.2.3 and 2026.3. TeamCity Cloud has already been fixed on JetBrains' side: the company applied corrective measures, found no evidence that any Cloud environment was exploited, and says Cloud customers need take no action.
The researcher Jiawei Guo reported the flaw privately on 24 November 2026, about eight days before the advisory. The CVE record carries a CVSS v3.1 score of 9.1 (Critical), as reported by The Hacker News and Ostorlab. The weakness class is CWE-639, authorization bypass through a user-controlled key, according to HOL. JetBrains has not published how the takeover works, and no public proof of concept was known to Ostorlab as of 3 December.
Why a CI compromise becomes a supply-chain problem
A build agent is trusted with whatever the build needs: deployment credentials, signing material, registry tokens. If an attacker can pose as an agent, the secrets are only part of the risk. Help Net Security notes that an attacker could also falsify build results or publish tampered artifacts, and downstream builds that consume those artifacts could end up running attacker-supplied code.
That is why this reaches beyond your own infrastructure. If your pipeline produces software your customers install, a poisoned artifact is their problem too.
Exploitation status: what we know and don't
At publication JetBrains said it was not aware of active exploitation. As of 3 December 2026, Ostorlab reported no public proof of concept, no in-the-wild exploitation and no CISA KEV listing. Check the KEV catalog yourself on the day you read this, because that status can change.
That picture changed within a day. The Hacker News updated its report with a post by the security firm watchTowr on X, which says it is "already observing attempted exploitation" of the flaw. According to watchTowr, an attacker has to guess the ID of an active build agent, which it calls no material barrier because agent IDs start at 1. The Mallory tracker dates the post to 3 December 2026, 20:48 UTC, and notes that it establishes reported attempts, not confirmed compromises. The safe reading: JetBrains knew of no exploitation at disclosure, and attempts were reported one day later.
Context matters too. Help Net Security describes this as the second critical, unauthenticated TeamCity flaw JetBrains fixed in a little over four months. The first, CVE-2026-63077, was patched in late July and added to CISA's KEV catalog roughly a week after disclosure.
A first-day plan for TeamCity CVE-2026-136858
1. Patch
Upgrade to 2026.1.7, 2026.2.3 or 2026.3. If you can't upgrade today, JetBrains released a security patch plugin for TeamCity 2021.2 or later that installs without restarting the server. It addresses only this vulnerability, so it does not replace upgrading. Install it now and schedule the upgrade after.
Auto-patching depends on your version:
- From TeamCity 2024.03, the server can download available security patches automatically and notify administrators.
- On 2024.03 through 2026.2.1, apply pending patches under Available security updates.
- On 2026.2.2 and later, select Install automatically under Security patches. JetBrains says a server with that setting already enabled should fetch and install this patch by itself. With Download and notify, you still have to apply the downloaded patch on the Updates page.
2. Shrink exposure
As an additional mitigation, the JetBrains advisory suggests a reverse proxy or other path-aware access control that allows requests to /app/agents and its subpaths only from the IP addresses where you expect legitimate build agents. JetBrains also advises limiting server access to trusted networks, using a VPN or other network access controls for users and agents that connect from outside, and running the server and agents on separate hosts.
An illustrative nginx shape, with placeholder addresses. It is a sketch, not JetBrains' configuration:
location /app/agents {
allow 10.20.0.0/24; # on-prem agent subnet
allow 203.0.113.10; # cloud agent NAT egress IP
deny all;
# keep your existing proxy_pass settings here
}
List every address your agents really use, or you will lock out legitimate builds. JetBrains explicitly says to include the outbound addresses of cloud agents and any NAT gateways they connect through. Ostorlab adds that the allowlist is a mitigation, not a fix: an attacker who can send from an allowed address is not stopped. Try it against one agent before rolling it out widely.
3. Check the logs
The JetBrains advisory says to search teamcity-server.log for entries containing this text:
grep -n "of the existing agent, but different authorization token" teamcity-server.log*
The phrase is followed by a token in quotes. A non-empty token may indicate an attempt to take over an existing agent, while an empty token ("") is expected. For a hit with a non-empty token, JetBrains says to use its timestamp to review that agent's connection history and the builds assigned to it around that time, check that the hostname and source IP address match what you expect for the agent, and compare the build logs, results and published artifacts to judge whether the attempt succeeded.
Treat a hit as a lead, not proof. Ostorlab adds that a failed attempt may leave no trace, and the search only reaches as far back as your log retention. A clean result tells you less than you'd like, especially if your retention is short.
4. Rotate if in doubt
If you suspect exploitation, JetBrains' order is: preserve the relevant logs and build results, update or patch the server, and rotate every credential passed to the potentially affected builds. Treat the artifacts those builds produced as untrusted until you verify them, and trace where they were used or deployed, including anything downstream builds consumed from them.
Reduce the blast radius for next time
The durable fix is making agent-held secrets worth less. Prefer short-lived, scoped credentials such as OIDC federation and workload identity over secrets stored in the CI system. On Azure, that means not handing long-lived service-principal secrets to agents. A stolen token that expires and is scoped to one deployment is a far smaller incident than a stolen client secret that works for months.
Also keep the server and the agents on separate hosts, as JetBrains advises, and keep the server off the open internet where your setup allows it.
Ask who owns CI
The technical steps are quick. The organizational question is slower: who patches CI on your team, and how fast? If nobody can answer within a day, that is the real finding. Assign an owner, put the CI server on the same patch-alerting channel as production systems, and define what "critical" means for it.
Key takeaways
- TeamCity CVE-2026-136858 affects all TeamCity On-Premises versions; fixed in 2026.1.7, 2026.2.3 and 2026.3. TeamCity Cloud customers need take no action.
- No authentication or account is needed, only HTTP(S) reachability of the server.
- If you can't upgrade today, install JetBrains' patch plugin (2021.2 or later, no restart), then upgrade.
- Restrict
/app/agentsat the reverse proxy to your real agent IPs, including cloud agent and NAT gateway addresses. - Search
teamcity-server.logfor the token phrase, but remember a clean log is not proof, given retention limits and failed attempts that may leave no trace. - On a suspicious hit, rotate all credentials the builds used and treat the artifacts as untrusted until verified.
- Use short-lived, scoped credentials (OIDC, workload identity) and separate server and agent hosts.
- JetBrains knew of no exploitation at disclosure on 2 December; watchTowr reported exploitation attempts on 3 December. Don't wait.
