On this page
On December 2nd, 2026 JetBrains announced a critical issue in TeamCity On-Premises. You don't need a TeamCity account. Anybody who has HTTP/HTTPS access to the server can impersonate a legit build agent. The attacker takes the real agent's place, receives the builds assigned to it, reads the secrets those builds run with, and can hand back falsified results and tampered artifacts.
The problem is in agent registration, which is where the build agent registers itself with the server. JetBrains tracks it as CVE-2026-136858 and scored it 9.1 out of 10 under CVSS v3.1. The CWE class is CWE-639: Authorization bypass via user controlled key. Security researcher Jiawei Guo reported it privately on November 24, 2026. JetBrains says it is not aware of any active exploitation, and the flaw is not in CISA's Known Exploited Vulnerabilities catalog.
The build agent is the worker of your pipeline. Builds pass it signing keys, cloud credentials, and deployment tokens, and everything downstream trusts what it returns. A hacked artifact doesn't stay on the build server. Later builds and deployments that consume it can end up running code the attacker supplied.
Affected product and versions
Every version of TeamCity On-Premises is affected. Fixed in 2026.1.7, 2026.2.3, 2026.3. JetBrains also released a security patch plugin for TeamCity 2021.2 and later, and it installs without restarting the server. If you have automatic security patch installation enabled in 2026.2.2 or higher you should already have it on your servers.
Who is not in scope
TeamCity Cloud has no such bug. JetBrains applied the fix there itself and found no evidence that any Cloud environment was exploited through this flaw. A server that no attacker can reach over HTTP or HTTPS gives the flaw no way in. Servers already on a fixed version, or carrying the patch plugin, are covered.
One check to run now
Search in teamcity-server.log for: of the existing agent, but different authorization token, followed by token in quotes. A non-empty token in an entry may indicate that someone was attempting to control one of your agents. Any empty token entry is fine; you can just ignore them. If you find a non-empty one, get the time, look at that agent's connection history, and look at what it built around the same time. Check whether the hostname and source IP match the agent you know. If the attempt looks real, preserve the logs, patch the server, rotate every credential those builds used, and treat the artifacts from those builds as untrusted until you have verified them.
What this is not
This is not a break-in through the TeamCity login page, and it does not hand anyone your user account. It is a stranger taking a build agent's seat on a server you run yourself.
How to fix
Upgrade the server to 2026.1.7 or 2026.2.3 or 2026.3. Get the patched version or switch to TeamCity automatic update feature.
If you cannot upgrade yet, install the security patch plugin. It covers TeamCity 2021.2 and later, fixes only this flaw, and installs without a server restart. You will find it under Administration and then Updates. Servers older than 2021.2 cannot use the plugin and need the full upgrade.
Before the patch is installed, make your reverse proxy only allow requests to /app/agents and subpaths from the ip addresses the build agents connect from. Include outbound addresses of cloud agents and Nat gateways (if any) that they go through. Then run the log check above before you call it done.
HOL's assessment
The most trusted computer in the pipeline is the build agent. It holds the secrets builds run with, and everyone downstream trusts what it returns. A flaw that lets a stranger take that seat is a supply chain problem, not a login problem. The patch plugin installs without a restart, and the log search JetBrains published takes minutes, so both belong on today's list.
Where to download Guard
HOL Guard is open source and free. You can use Guard Desktop on macOS 13+ (Apple silicon), Windows x64 and Linux x86_64. No terminal required. There is a one command terminal installation on the same install page. After installing, hol-guard doctor will tell you that daemon is started and the intercept layer is up and working.
Sources
JetBrains, Critical Security Issue Affecting TeamCity On-Premises (CVE-2026-136858): https://blog.jetbrains.com/teamcity/2026/12/cve-2026-136858/
The Hacker News, Critical JetBrains TeamCity Flaw Lets Attackers Hijack Build Agents Without Authentication: http://thehackernews.com/2026/12/critical-jetbrains-teamcity-flaw-lets.html
JetBrains, fixed security issues list (TW-105963): https://www.jetbrains.com/privacy-security/issues-fixed/
We can't make an upgrade this week. So what can we do today?
For TeamCity 2021.2+ install the security patch plugin. No need to restart to install it. Then configure your reverse proxy so that only /app/agents can be accessed from the ips your build agents use. If you have older servers (before 2021.2) you are stuck with proxy restriction until you upgrade.
How can I tell if somebody has already exploited this weakness?
Search teamcity-server.log for the agent takeover line JetBrains published, the one about an existing agent with a different authorization token. Non-empty token in that line is a hint that something's up. Review that agent's builds from that time, rotate the credentials they used, and treat their artifacts as untrusted until verified.
Reviewed . 2 questions.
We can't make an upgrade this week. So what can we do today?
For TeamCity 2021.2+ install the security patch plugin. No need to restart to install it. Then configure your reverse proxy so that only /app/agents can be accessed from the ips your build agents use. If you have older servers (before 2021.2) you are stuck with proxy restriction until you upgrade.
How can I tell if somebody has already exploited this weakness?
Search teamcity-server.log for the agent takeover line JetBrains published, the one about an existing agent with a different authorization token. Non-empty token in that line is a hint that something's up. Review that agent's builds from that time, rotate the credentials they used, and treat their artifacts as untrusted until verified.
Sources