There is a line in your TeamCity log that reads "of the existing agent, but different authorization token <token>". It means somebody turned up with the identifier of an agent that already existed and a token that was not its own. The server saw it, wrote it down and let it through. That is CVE-2026-136858, and what makes it an unusual case is not the 9.1 rating: it is that the server had been documenting the anomaly on its own without anyone wiring that note to a decision.
What the server was not binding
The advisory JetBrains published on 3 December affects TeamCity On-Premises and is terse about the mechanism: it says what can be done, not how. Ostorlab explained that part, having decompiled the patch plugin. Their reading is that TeamCity "did not bind a claimed build-agent identity to the authorization token stored for that agent", at the endpoint where agents register, /app/agents. A request arrived saying "I am agent 7", the server looked up agent 7, saw that the token did not match the one on file —and noted it— and went ahead with the registration anyway.
The fix is exactly what is missing from that sentence. Per the same analysis, the filter the patch adds "resolves the claimed agent, compares the presented token with the stored token in constant time, and rejects the request when the token is missing or different", using BuildAgentManager.findAgentById, SBuildAgent.getAuthorizationToken() and MessageDigest.isEqual. Three calls. The comparison was already happening enough to be written to the log; the patch promotes it to a condition of entry. The whole vulnerability fits in that distance: between looking and deciding.
The availability metric is "N", and that is the point
The CVSS 3.1 vector for this one is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, 9.1. The last three letters are worth reading slowly. Confidentiality: high. Integrity: high. Availability: none. Nothing falls over. No hang, no restart, no CPU spike, no job going red.
The advisory explains why, and the four sentences are worth reading whole because they climb: "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. An attacker could also falsify build results or publish tampered artifacts. Downstream builds that consume those artifacts could execute attacker-supplied code". Which is to say: the score tells you your availability does not move, and the last sentence tells you attacker code may end up running somewhere that is not even this system.
That verb, displace, is the one to hold on to. The attacker does not kick a door in: they take a seat. They sit where your agent was, and the work queue hands them what was meant for it. None of that trips an availability alert, because availability has not moved. We have written before about an alert that fires and decides nothing; this is the same family of problem, seen from the side of whoever grants access.
An identifier that starts at one
The timeline is short. Jiawei Guo reported the flaw privately on 24 November. JetBrains published the advisory and the patch on 3 December, saying at the time: "At the time of publishing this advisory, we are not aware of any active exploitation of this vulnerability". The next day, watchTowr reported that the vulnerability "was reverse engineered, reproduced, and exploited in the wild against the watchTowr Attacker Eye honeypot network around a day after disclosure, which feels slow by some standards now". Both are true, and they are one day apart.
Jake Knott, of watchTowr, supplies the two numbers that were missing. The cost of the attack: "Successful exploitation allows an attacker to impersonate and take control over a build agent in as little as two HTTP requests". And the only prerequisite, which is the part that should sting: "The attackers we've captured so far trying their luck are trying to guess the ID numbers of long-running and commonly numbered build agents, which is the only real prerequisite for exploitation, and it's not particularly hard, as they start at 'one' and go upwards". The secret protecting your machines' identity was a counter.
It is worth not stretching that beyond what it supports: what watchTowr saw was exploitation against its own honeypots, which is exactly what they exist for. There is no public record of any company compromised this way, and the CVE is not in CISA's catalogue of exploited vulnerabilities. What that one day marks is the clock: planning your patching around weeks of margin is planning around a margin that is no longer there.
You ask people for SSO; you ask machines for a number
Look at what your build pipeline demands on each side, which is where this stops being a TeamCity matter. From a person: federated identity, second factor, roles, per-project permissions, mandatory review, protected branches. From the machine that executes the code: a sequential identifier and a token that, until this patch, the server did not check actually belonged to it. We have spent a decade hardening human identity and left machine identity where it was the day we set up the first agent.
The mitigation the advisory offers while you upgrade makes it plain. JetBrains titles it "Additional mitigation" —not an alternative to the patch— and says: "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". In 2026, the control holding you up against machine identity spoofing is a list of IP addresses. That is not a dig: it is a portrait of the state of the art, and it is literally the assumption Zero Trust has spent years trying to dismantle, that being on the right network is the same as being who you say you are.
What you can check today, looking backwards
Almost always, when an advisory lands, the question "did someone do this to me?" has no answer: there is no trace, because nobody was watching. Here there is one, because the server had been noting down what it was not blocking. We do not know from which version that line is emitted and the advisory does not say; we do know unpatched versions emit it, and every version is affected. Your rotated files may hold it. The advisory tells you to search teamcity-server.log for entries containing this text:
of the existing agent, but different authorization token "<token>"
And it gives the reading rule: "A non-empty token may indicate an attempt to take over an existing build agent. Entries with an empty token ("") are expected and can be disregarded for this check". That matters for the command, because a bare grep hands you exactly the noise the advisory just told you to ignore. With the filter in place:
grep -F 'of the existing agent, but different authorization token' \
/opt/TeamCity/logs/teamcity-server.log* \
| grep -v 'authorization token ""'
Adjust the path to your installation and do not stop at today's file. If something comes up, the advisory itself describes the triage, and it is sound: take the entry's timestamp, review that agent's connection history and the builds assigned to it around that time, verify that the hostname and source IP match what you expect for that agent, and compare against the build logs, build results and published artifacts to decide whether the attempt succeeded.
The order of the afternoon
- 1. Who can reach your TeamCity? This decides whether the rest is urgent this afternoon or next week. If the server is published on the internet, all the attacker has left is guessing a number. If it is only reachable from your network and your offices, you still have homework, but not at eight tonight. And if answering that takes you a while, what you are missing is not this patch: it is the inventory of what you have exposed and why, which gets done in the cold, not on advisory day.
- 2. The version, and the auto-patch trap. Fixed in 2026.1.7, 2026.2.3 and 2026.3; every earlier On-Premises version is affected. But before scheduling anything, open Administration | Updates, because it may already be applied or it may never be. From 2024.03 to 2026.2.1, pending patches appear under Available security updates and have to be applied by hand. From 2026.2.2 on there are three settings, and only one lets you sleep: with Install automatically the server patches itself; with Download and notify it downloads and waits for you; and with Ignore —which the advisory itself discourages— nothing happens at all. That third one is the dangerous setting, because from the outside a server on Ignore and a server that is up to date look very much alike.
- 3. If you cannot upgrade today, the patch plugin. It covers 2021.2 and later and installs without restarting the server. With the small print the advisory sets in bold: it fixes only this vulnerability, and JetBrains still recommends updating. That a patch exists for a five-year-old version says a fair bit about the state of the real-world estate, ours included.
- 4. The backwards grep, with its filter. Do it even if you upgrade today, and before the files rotate. It is the only check on this list that speaks about the past rather than the future. If it comes back positive, the advisory is explicit about what follows: preserve logs and build results, patch, rotate any credentials passed to potentially affected builds, treat their artifacts as untrusted until verified, and trace where they were used or deployed. The only thing we are adding is the list of what tends to be in there: deployment credentials, container registry tokens and signing material. Which is to say, the things you cannot swap in ten minutes.
- 5. The one with no CVE: how many agents do you have, and who knows without looking it up? If the answer takes a while, this patch does not fix that problem. An agent nobody remembers enrolling still has its number, its token and its place in the queue, and will still have them when the next advisory lands.
When this is not about you
If you are on TeamCity Cloud, there is nothing for you to do, and the reason is worth reading: JetBrains says it has "already applied the necessary corrective measures to TeamCity Cloud" and found no evidence any Cloud environment was exploited this way. Cloud was not immune; they patched it for you. And if you run something else —GitLab CI, GitHub Actions with self-hosted runners, Jenkins, a container that spins up a runner and shuts down— the advisory is not yours, but the question is: how does your pipeline prove that the machine asking for work is the machine you enrolled? If the answer is "it has the token", the next one is who checks that the token is that machine's and not just anybody's. A few months ago we wrote about another TeamCity flaw and what a CI server really holds: that one was noisy, this one is not. The agent inventory is the same job in both cases.
What we are not claiming. We have not reproduced the flaw and we have not seen a public exploit; none was on record as we closed this text, and the CVE is not in CISA's catalogue of known exploited vulnerabilities. We do not know how many TeamCity servers are exposed on the internet: there is no reliable figure and we are not going to estimate one. What watchTowr describes is exploitation against its own honeypot network, not a confirmed breach at any company, and we report it as such. The description of the mechanism and the filter's three calls come from Ostorlab working on the decompiled plugin, not from JetBrains' advisory. And we are not resellers of JetBrains or any other CI tool: we charge for designing and operating, not for what you subscribe to.
Sources (verified at origin on 04/12/2026): the primary source is the advisory "Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858): Update to 2026.1.7, 2026.2.3, or 2026.3 Now", by Daniel Gallo, JetBrains, published on 03/12/2026 and downloaded as raw HTML to check the quotes. From it come: that it affects all On-Premises versions and requires no authentication; the fixed versions; the patch plugin for 2021.2 and later that installs without a restart and "will address only the vulnerability described above"; the three Administration | Updates settings and the behaviour per version range; Jiawei Guo's private report of 24/11/2026; the four sentences of "Technical details" including "Downstream builds that consume those artifacts could execute attacker-supplied code"; the sentence "At the time of publishing this advisory, we are not aware of any active exploitation of this vulnerability"; the log string "of the existing agent, but different authorization token <token>" and the rule "A non-empty token may indicate an attempt to take over an existing build agent. Entries with an empty token ('') are expected and can be disregarded for this check"; the follow-up triage and credential rotation; the "Additional mitigation" text about /app/agents; and the TeamCity Cloud paragraph. The mechanism of the flaw, the servlet filter and the symbols BuildAgentManager.findAgentById, SBuildAgent.getAuthorizationToken() and MessageDigest.isEqual come from Ostorlab's analysis of the decompiled plugin. Jake Knott's (watchTowr) statements about the Attacker Eye honeypots, the two HTTP requests and the identifiers that "start at 'one' and go upwards" were published by Cyber Daily on 04/12/2026. The CVSS 3.1 score of 9.1 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N and the CWE-639 classification are on the CVE record (some outlets give 9.2; the vector computes to 9.1). Translations of the quotes are ours; the English originals are behind the links. Photograph: "Numbers metal deposit boxes bank", rawpixel, CC0.
Who checks that your machines are yours?
At everyWAN we treat the build pipeline as what it is: a production system with production credentials. That means an inventory of what connects to it, logs that lead to a decision and not just to a file, and a review of what is exposed and why — the part of cybersecurity nobody bills for until it is needed. And every machine's identity on Zero Trust terms: being on the network is not being who you say you are. If you want us to look at your CI before somebody else does, write to us.
Talk to everyWAN