Be first to know. Be ready to defend.

TeamCity flaw CVE-2026-136858 lets attackers hijack build agents without logging in

Illustration headed TeamCity flaw lets attackers pose as your build agents. A terminal box traces an agent takeover: an attacker with no TeamCity account guesses agent IDs 1, 2, 3; the server swaps in the fake agent; build secrets go to the attacker; tampered artifacts are shipped on. A footer says it is fixed in 2026.1.7, 2026.2.3 and 2026.3. Chips read CVE-2026-136858, CVSS 9.1, Attempts seen.Illustration headed TeamCity flaw lets attackers pose as your build agents. A terminal box traces an agent takeover: an attacker with no TeamCity account guesses agent IDs 1, 2, 3; the server swaps in the fake agent; build secrets go to the attacker; tampered artifacts are shipped on. A footer says it is fixed in 2026.1.7, 2026.2.3 and 2026.3. Chips read CVE-2026-136858, CVSS 9.1, Attempts seen.
On this page
  1. A day from patch to attempts
  2. What a fake agent can do
  3. How to fix it
  4. What to do

If you run TeamCity On-Premises, patch it today. JetBrains has fixed a flaw that lets anyone who can reach your server pretend to be one of your build agents, take the builds meant for it and read the secrets those builds use. No TeamCity account is needed.

JetBrains disclosed CVE-2026-136858 on 2 December and rates it CVSS 3.1 9.1. Researcher Jiawei Guo reported it privately on 24 November. Every On-Premises version before the fixed releases is affected. TeamCity Cloud has already been fixed, and JetBrains says it found no sign that any Cloud environment was exploited.

A day from patch to attempts

When JetBrains published its advisory, it said it wasn’t aware of any active exploitation. The next day, watchTowr said on X that its threat intelligence team was already seeing exploitation attempts.

Those claims don’t contradict each other. JetBrains was describing what it knew at publication, and watchTowr is reporting attempts, not confirmed break-ins. watchTowr hasn’t published a write-up, and the flaw isn’t in CISA’s Known Exploited Vulnerabilities catalogue as of 3 December.

The attack needs the ID of an active build agent. watchTowr says that’s not much of a barrier, because TeamCity numbers its agents from 1, so an attacker can simply count up.

TeamCity servers have a history here. CISA added CVE-2026-63077, an unauthenticated code execution flaw in the agent polling protocol, to its Known Exploited Vulnerabilities catalogue on 5 August, a little over a week after JetBrains patched it, and lists it as used in ransomware campaigns.

What a fake agent can do

JetBrains hasn’t published how the bypass works, only that it sits in agent registration. It has spelled out the impact, though.

What an attacker can do with CVE-2026-136858. Step 1: pose as an existing build agent over HTTP or HTTPS, with no TeamCity user account. Step 2: push the real agent aside, so builds assigned to it go to the attacker. Step 3: read the build secrets, the credentials and tokens passed to the agent. Step 4: falsify build results and tamper with artifacts. Step 5: downstream builds that consume those artifacts run the attacker’s code. watchTowr says the agent ID is easy to guess, because IDs start at 1.What an attacker can do with CVE-2026-136858. Step 1: pose as an existing build agent over HTTP or HTTPS, with no TeamCity user account. Step 2: push the real agent aside, so builds assigned to it go to the attacker. Step 3: read the build secrets, the credentials and tokens passed to the agent. Step 4: falsify build results and tamper with artifacts. Step 5: downstream builds that consume those artifacts run the attacker’s code. watchTowr says the agent ID is easy to guess, because IDs start at 1.

A build server usually holds the keys to everything you ship: signing keys, cloud credentials, deployment tokens. An attacker who can read those, or swap a build’s output, has a direct route into your software and your customers’ systems.

How to fix it

How to fix CVE-2026-136858. TeamCity 2026.3, the latest release, is fixed. On the 2026.2 branch, update to 2026.2.3. On the 2026.1 branch, update to 2026.1.7. On TeamCity 2021.2 or later, install the security patch plugin, which needs no restart. On 2026.2.2 or later, the plugin installs itself if automatic security patches are turned on. TeamCity Cloud is already fixed and needs no action.How to fix CVE-2026-136858. TeamCity 2026.3, the latest release, is fixed. On the 2026.2 branch, update to 2026.2.3. On the 2026.1 branch, update to 2026.1.7. On TeamCity 2021.2 or later, install the security patch plugin, which needs no restart. On 2026.2.2 or later, the plugin installs itself if automatic security patches are turned on. TeamCity Cloud is already fixed and needs no action.

Update to 2026.1.7, 2026.2.3 or 2026.3. If you can’t upgrade straight away, install the security patch plugin, which works on TeamCity 2021.2 and later without a restart. It fixes only this flaw, so plan the full upgrade too.

On 2024.03 and later, TeamCity can download the patch itself. Look under Administration, then Updates. If you’re on 2026.2.2 or later and security patches are set to install automatically, your server may already have it.

What to do

  1. Patch or upgrade today. Use whichever of the options above you can do fastest.

  2. Restrict the agent endpoints. JetBrains recommends that your reverse proxy, or another path-aware access control, allows requests to /app/agents and everything under it only from addresses where your build agents run. Include the outbound addresses of cloud agents and any NAT gateways they go through.

  3. Check for takeover attempts. Search teamcity-server.log for lines containing this text:

    of the existing agent, but different authorization token

    JetBrains says entries with an empty token are normal. A non-empty token may mean someone tried to take over that agent. Check that agent’s connection history around that time, and confirm its hostname and IP address are what you expect.

  4. If you find signs of a takeover, treat those builds as compromised. Keep the logs, rotate every credential passed to the affected builds, and don’t trust their artifacts until you’ve verified them and traced where they went.

  5. If your server was reachable from the internet and unpatched, consider rotating build secrets anyway. With attempts already reported and agent IDs easy to guess, a clean log check is reassuring but not proof.